]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
media: staging: atomisp: lm3554: Fix control values
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 19 Dec 2017 20:59:50 +0000 (15:59 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 29 Dec 2017 11:25:40 +0000 (06:25 -0500)
Driver fails to initialize due to insane settings in the
control init array.

Fix this by moving to sanity.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/i2c/atomisp-lm3554.c

index 4fd9f538ac95d309ec978dfa7f88d12be80e9b21..974b6ff50c7a3c09dc5cf943bd6dc2247615c854 100644 (file)
@@ -562,10 +562,10 @@ static const struct v4l2_ctrl_config lm3554_controls[] = {
        {
         .ops = &ctrl_ops,
         .id = V4L2_CID_FLASH_STATUS,
-        .type = V4L2_CTRL_TYPE_BOOLEAN,
+        .type = V4L2_CTRL_TYPE_INTEGER,
         .name = "Flash Status",
-        .min = 0,
-        .max = 100,
+        .min = ATOMISP_FLASH_STATUS_OK,
+        .max = ATOMISP_FLASH_STATUS_TIMEOUT,
         .step = 1,
         .def = ATOMISP_FLASH_STATUS_OK,
         .flags = 0,
@@ -574,10 +574,10 @@ static const struct v4l2_ctrl_config lm3554_controls[] = {
        {
         .ops = &ctrl_ops,
         .id = V4L2_CID_FLASH_STATUS_REGISTER,
-        .type = V4L2_CTRL_TYPE_BOOLEAN,
+        .type = V4L2_CTRL_TYPE_INTEGER,
         .name = "Flash Status Register",
         .min = 0,
-        .max = 100,
+        .max = 255,
         .step = 1,
         .def = 0,
         .flags = 0,