[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181127083445.27737-2-luca@lucaceresoli.net>
Date: Tue, 27 Nov 2018 09:34:44 +0100
From: Luca Ceresoli <luca@...aceresoli.net>
To: linux-media@...r.kernel.org
Cc: Luca Ceresoli <luca@...aceresoli.net>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Leon Luo <leonl@...pardimaging.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] media: imx274: declare the correct number of controls
v4l2_ctrl_handler_init() expects a hint of how many controls this
handler is expected to refer to. Since this number here is always 4,
let's pass exactly 4.
Signed-off-by: Luca Ceresoli <luca@...aceresoli.net>
---
drivers/media/i2c/imx274.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index 78746c51071d..40c717f13eb8 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -1904,7 +1904,7 @@ static int imx274_probe(struct i2c_client *client,
imx274_reset(imx274, 1);
/* initialize controls */
- ret = v4l2_ctrl_handler_init(&imx274->ctrls.handler, 2);
+ ret = v4l2_ctrl_handler_init(&imx274->ctrls.handler, 4);
if (ret < 0) {
dev_err(&client->dev,
"%s : ctrl handler init Failed\n", __func__);
--
2.17.1
Powered by blists - more mailing lists