]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: ov2680: Don't take the lock for try_fmt calls
authorHans de Goede <hdegoede@redhat.com>
Thu, 3 Aug 2023 09:33:20 +0000 (11:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:47 +0000 (12:22 +0200)
commit784d1b83ae2c28bd1d964813bd8433ade045bcd1
treee7303faaff1905c90f23cc3a3b35a0732c3f31a2
parentdbb717b4ee68489000c5b0470a20ac71dd4075c8
media: ov2680: Don't take the lock for try_fmt calls

[ Upstream commit e521b9cc1a49de677f4fc65909ce4877fbf7b113 ]

On ov2680_set_fmt() calls with format->which == V4L2_SUBDEV_FORMAT_TRY,
ov2680_set_fmt() does not talk to the sensor.

So in this case there is no need to lock the sensor->lock mutex or
to check that the sensor is streaming.

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/ov2680.c