fimc-is: get rid of struct v4l2_subdev_core_ops::init usage
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 30 Jul 2015 04:21:48 +0000 (13:21 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:47:45 +0000 (13:47 +0900)
init is too limited to be used in this driver, it is deprecated
and usage of this callback should be removed anyway.
There is no device nodes for subdevs so ioctl is no exposed to
user space.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/media/platform/exynos/fimc-is/fimc-is-device-csi.c
drivers/media/platform/exynos/fimc-is/fimc-is-device-flite.c
drivers/media/platform/exynos/fimc-is/fimc-is-device-sensor.c
drivers/media/platform/exynos/fimc-is/sensor/fimc-is-device-6d1.c
drivers/media/platform/exynos/fimc-is/sensor/fimc-is-device-imx240.c

index 2e21082..cf712eb 100644 (file)
@@ -103,7 +103,7 @@ int fimc_is_csi_close(struct v4l2_subdev *subdev)
 }
 
 /* value : module enum */
-static int csi_init(struct v4l2_subdev *subdev, void *value)
+static long csi_init(struct v4l2_subdev *subdev, unsigned int cmd, void *value)
 {
        int ret = 0;
        struct fimc_is_device_csi *csi;
@@ -167,7 +167,7 @@ p_err:
 }
 
 static const struct v4l2_subdev_core_ops core_ops = {
-       .init = csi_init,
+       .ioctl = csi_init,
        .s_power = csi_s_power
 };
 
index 46aa3d8..7346262 100644 (file)
@@ -1495,7 +1495,8 @@ p_err:
 }
 
 /* value : csi ch */
-static int flite_init(struct v4l2_subdev *subdev, void *value)
+static long flite_init(struct v4l2_subdev *subdev, unsigned int cmd,
+                      void *value)
 {
        int ret = 0;
        struct fimc_is_device_flite *flite;
@@ -1842,7 +1843,7 @@ p_err:
 }
 
 static const struct v4l2_subdev_core_ops core_ops = {
-       .init = flite_init,
+       .ioctl = flite_init,
        .s_ctrl = flite_s_ctrl,
 };
 
index 33c7770..0e226f4 100644 (file)
@@ -1139,20 +1139,21 @@ int fimc_is_sensor_s_input(struct fimc_is_device_sensor *device,
                goto p_err;
        }
 
-       ret = v4l2_subdev_call(subdev_flite, core, init, (void *)(long)device->pdata->csi_ch);
+       ret = v4l2_subdev_call(subdev_flite, core, ioctl, 0,
+                              (void *)(long)device->pdata->csi_ch);
        if (ret) {
                merr("v4l2_flite_call(init) is fail(%d)", device, ret);
                goto p_err;
        }
 
-       ret = v4l2_subdev_call(subdev_csi, core, init, module);
+       ret = v4l2_subdev_call(subdev_csi, core, ioctl, 0, module);
        if (ret) {
                merr("v4l2_csi_call(init) is fail(%d)", device, ret);
                goto p_err;
        }
 
        if (test_bit(FIMC_IS_SENSOR_DRIVING, &device->state)) {
-               ret = v4l2_subdev_call(subdev_module, core, init, 0);
+               ret = v4l2_subdev_call(subdev_module, core, ioctl, 0, 0);
                if (ret) {
                        merr("v4l2_module_call(init) is fail(%d)", device, ret);
                        goto p_err;
index c6d2af2..2de119c 100644 (file)
@@ -238,7 +238,8 @@ static const struct v4l2_subdev_internal_ops internal_ops = {
        .unregistered = sensor_6d1_unregistered,
 };
 
-static int sensor_6d1_init(struct v4l2_subdev *subdev, void *val)
+static long sensor_6d1_init(struct v4l2_subdev *subdev, unsigned int cmd,
+                           void *val)
 {
        int i, ret = 0;
        struct fimc_is_module_enum *module;
@@ -268,7 +269,7 @@ static int sensor_6d1_init(struct v4l2_subdev *subdev, void *val)
 }
 
 static const struct v4l2_subdev_core_ops core_ops = {
-       .init = sensor_6d1_init
+       .ioctl = sensor_6d1_init
 };
 
 static int sensor_6d1_s_stream(struct v4l2_subdev *subdev, int enable)
index 4067119..9472e0e 100644 (file)
@@ -59,7 +59,8 @@ static struct fimc_is_sensor_cfg config_imx240[] = {
        //FIMC_IS_SENSOR_CFG(824, 496, 300, 13, 8),
 };
 
-static int sensor_imx240_init(struct v4l2_subdev *subdev, void *val)
+static long sensor_imx240_init(struct v4l2_subdev *subdev, unsigned int cmd,
+                             void *val)
 {
        int ret = 0;
        struct fimc_is_module_enum *module;
@@ -74,7 +75,7 @@ static int sensor_imx240_init(struct v4l2_subdev *subdev, void *val)
 }
 
 static const struct v4l2_subdev_core_ops core_ops = {
-       .init = sensor_imx240_init
+       .ioctl = sensor_imx240_init
 };
 
 static const struct v4l2_subdev_ops subdev_ops = {