media: i2c: ov5647: Use bus-locked i2c_transfer()
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>
Tue, 21 Feb 2023 17:10:48 +0000 (18:10 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 20 Mar 2023 07:55:57 +0000 (08:55 +0100)
commit0d840d425e77c85606488bb6869d72a57fcbd04b
tree8ceb564912b44cde60c07235d7200ebddea4b8f8
parentca4331bd0d6d8590d999d2cef93f0bfe9266bb21
media: i2c: ov5647: Use bus-locked i2c_transfer()

The ov5647_read() functions calls i2c_master_send() and
i2c_master_read() in sequence. However this leaves space for other
clients to contend the bus and insert an unrelated transaction in between
the two calls.

Replace the two calls with a single i2c_transfer() one, that locks the
bus in between the transactions.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Tommaso Merciai <tomm.merciai@gmail.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov5647.c