Skip to content
/ linux Public

Commit d03a29c

Browse files
xiaoleiwang123456Sasha Levin
authored andcommitted
media: i2c: ov5647: use our own mutex for the ctrl lock
[ Upstream commit 973e42f ] __v4l2_ctrl_handler_setup() and __v4l2_ctrl_modify_range() contains an assertion to verify that the v4l2_ctrl_handler::lock is held, as it should only be called when the lock has already been acquired. Therefore use our own mutex for the ctrl lock, otherwise a warning will be reported. Fixes: 4974c2f ("media: ov5647: Support gain, exposure and AWB controls") Cc: stable@vger.kernel.org Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com> [Sakari Ailus: Fix a minor conflict.] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 089625c commit d03a29c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/media/i2c/ov5647.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,8 @@ static int ov5647_init_controls(struct ov5647 *sensor)
12971297

12981298
v4l2_ctrl_handler_init(&sensor->ctrls, 9);
12991299

1300+
sensor->ctrls.lock = &sensor->lock;
1301+
13001302
v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops,
13011303
V4L2_CID_AUTOGAIN, 0, 1, 1, 0);
13021304

0 commit comments

Comments
 (0)