summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaolei Wang <xiaolei.wang@windriver.com>2025-12-05 15:19:18 +0800
committerSasha Levin <sashal@kernel.org>2026-03-04 07:21:08 -0500
commitd03a29cb36d6c8824ba568fed2c494daa977b42b (patch)
tree4ff3c2f2ccb7fbeefa44a1925323f45f26841d77
parent089625cccd7eb8d65a381e81f1e3e1db064334df (diff)
media: i2c: ov5647: use our own mutex for the ctrl lock
[ Upstream commit 973e42fd5d2b397bff34f0c249014902dbf65912 ] __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: 4974c2f19fd8 ("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>
-rw-r--r--drivers/media/i2c/ov5647.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index 6c7a1f2c1ed2..b8033fb7aa30 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -1297,6 +1297,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);