]> git.hungrycats.org Git - linux/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>
Wed, 13 Sep 2023 07:48:32 +0000 (09:48 +0200)
commit279a562c4af26a44020ed6df41a90f4ded78a74b
tree5363e57d7ef7aa6658bcf16622d0717a2309587e
parent039e14a17a1b92912333f4608e6d34d6fd3a04c4
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