]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: adv7180: Move state mutex handling outside init_device()
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 28 Aug 2025 16:06:46 +0000 (18:06 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 4 Sep 2025 08:06:13 +0000 (10:06 +0200)
commitf18491f18077e9f914a23070b827d817ef8954b6
treeb6f0623c784d75454bb6dfd19af7d6c444595220
parent878c496ac5080f94a93a9216a8f70cfd67ace8c9
media: adv7180: Move state mutex handling outside init_device()

Future rework to get rid of .s_power requires the state mutex to be
held for multiple operations where initializing the device is one of
them.

Move lock handling outside init_device() but enforce the lock is held
with a lockdep_assert_held().

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/adv7180.c