1 From 9da6b4ad7ee76da4d274f305412fc6f2bc95c91c Mon Sep 17 00:00:00 2001
2 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 Date: Sun, 16 Oct 2022 09:15:05 +0300
4 Subject: [PATCH] media: i2c: imx290: Use device lock for the control
7 Upstream commit 08878cbc0cbf.
9 The link frequency and pixel rate controls are set without holding the
10 control handler lock, resulting in kernel warnings. As the value of
11 those controls depend on the format, the simplest fix is to use the
12 device lock for the control handler.
14 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
15 Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
16 Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
18 drivers/media/i2c/imx290.c | 1 +
19 1 file changed, 1 insertion(+)
21 --- a/drivers/media/i2c/imx290.c
22 +++ b/drivers/media/i2c/imx290.c
23 @@ -1043,6 +1043,7 @@ static int imx290_probe(struct i2c_clien
24 imx290_entity_init_cfg(&imx290->sd, NULL);
26 v4l2_ctrl_handler_init(&imx290->ctrls, 4);
27 + imx290->ctrls.lock = &imx290->lock;
29 v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops,
30 V4L2_CID_GAIN, 0, 72, 1, 0);