summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/imx290.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-16 09:15:05 +0300
committerSakari Ailus <sakari.ailus@linux.intel.com>2022-10-27 14:38:00 +0300
commit08878cbc0cbf69dfc084436449d6e6fb1640796b (patch)
tree28de4ba453e052f8e9c8fc34086607993212a6f8 /drivers/media/i2c/imx290.c
parenta96dfea1df25bf22f4b02080a85ac87f7a3977d0 (diff)
downloadlinux-08878cbc0cbf69dfc084436449d6e6fb1640796b.tar.bz2
media: i2c: imx290: Use device lock for the control handler
The link frequency and pixel rate controls are set without holding the control handler lock, resulting in kernel warnings. As the value of those controls depend on the format, the simplest fix is to use the device lock for the control handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Diffstat (limited to 'drivers/media/i2c/imx290.c')
-rw-r--r--drivers/media/i2c/imx290.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
index 1ce64dcdf7f0..e5b758356a7a 100644
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -1043,6 +1043,7 @@ static int imx290_probe(struct i2c_client *client)
imx290_entity_init_cfg(&imx290->sd, NULL);
v4l2_ctrl_handler_init(&imx290->ctrls, 4);
+ imx290->ctrls.lock = &imx290->lock;
v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops,
V4L2_CID_GAIN, 0, 72, 1, 0);