From: Laurent Pinchart Date: Sun, 16 Oct 2022 06:15:05 +0000 (+0300) Subject: media: i2c: imx290: Use device lock for the control handler X-Git-Tag: v6.2-rc1~125^2~251^2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=08878cbc0cbf69dfc084436449d6e6fb1640796b;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus --- diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c index 1ce64dcdf7f02..e5b758356a7a7 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);