mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-29 12:28:27 +02:00
media: i2c: ov5647: use our own mutex for the ctrl lock
[ Upstream commit973e42fd5d] __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:4974c2f19f("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>
This commit is contained in:
committed by
Sasha Levin
parent
e83c4debf2
commit
13aa594f5f
@@ -1291,6 +1291,8 @@ static int ov5647_init_controls(struct ov5647 *sensor)
|
||||
|
||||
v4l2_ctrl_handler_init(&sensor->ctrls, 9);
|
||||
|
||||
sensor->ctrls.lock = &sensor->lock;
|
||||
|
||||
v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops,
|
||||
V4L2_CID_AUTOGAIN, 0, 1, 1, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user