diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-09-27 14:25:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-10-31 06:21:20 -0400 |
commit | 32471bdaa28291e18108d91f7b1c56b68e032c03 (patch) | |
tree | fd4af97736c0e8b2d7869f4cd88bfe3f89368c98 /drivers/staging/media/atomisp | |
parent | d2cde88348ec2d0cfaad5cd3f6339eeef69e5c7f (diff) | |
download | op-kernel-dev-32471bdaa28291e18108d91f7b1c56b68e032c03.zip op-kernel-dev-32471bdaa28291e18108d91f7b1c56b68e032c03.tar.gz |
media: staging: atomisp: Remove ->gpio_ctrl() callback
There is redundant callback which does nothing in upstreamed version of
the driver.
Remove it along with user call places.
Mostly done with help of coccinelle.
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>
Diffstat (limited to 'drivers/staging/media/atomisp')
8 files changed, 0 insertions, 30 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c index 5fd4e94..70cc041 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c @@ -771,10 +771,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) if (!dev || !dev->platform_data) return -ENODEV; - /* Non-gmin platforms use the legacy callback */ - if (dev->platform_data->gpio_ctrl) - return dev->platform_data->gpio_ctrl(sd, flag); - /* GPIO0 == "reset" (active low), GPIO1 == "power down" */ if (flag) { /* Pulse reset, then release power down */ diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index aa6bde6..9a97db6 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -571,10 +571,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) if (!dev || !dev->platform_data) return -ENODEV; - /* Non-gmin platforms use the legacy callback */ - if (dev->platform_data->gpio_ctrl) - return dev->platform_data->gpio_ctrl(sd, flag); - ret |= dev->platform_data->gpio1_ctrl(sd, !flag); usleep_range(60, 90); return dev->platform_data->gpio0_ctrl(sd, flag); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index cd4765e2..81f90bc 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c @@ -480,10 +480,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) if (!dev || !dev->platform_data) return -ENODEV; - /* Non-gmin platforms use the legacy callback */ - if (dev->platform_data->gpio_ctrl) - return dev->platform_data->gpio_ctrl(sd, flag); - /* Note: current modules wire only one GPIO signal (RESET#), * but the schematic wires up two to the connector. BIOS * versions have been unfortunately inconsistent with which diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c index d44d4d4..041e30f 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c @@ -871,10 +871,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) if (!dev || !dev->platform_data) return -ENODEV; - /* Non-gmin platforms use the legacy callback */ - if (dev->platform_data->gpio_ctrl) - return dev->platform_data->gpio_ctrl(sd, flag); - /* The OV2680 documents only one GPIO input (#XSHUTDN), but * existing integrations often wire two (reset/power_down) * because that is the way other sensors work. There is no diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c index d1f149e..80f6aa0 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c @@ -677,10 +677,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) if (!dev || !dev->platform_data) return -ENODEV; - /* Non-gmin platforms use the legacy callback */ - if (dev->platform_data->gpio_ctrl) - return dev->platform_data->gpio_ctrl(sd, flag); - /* Note: the GPIO order is asymmetric: always RESET# * before PWDN# when turning it on or off. */ diff --git a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c index 796d33d..8091817 100644 --- a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c +++ b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c @@ -1332,10 +1332,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) if (!dev || !dev->platform_data) return -ENODEV; - /* Non-gmin platforms use the legacy callback */ - if (dev->platform_data->gpio_ctrl) - return dev->platform_data->gpio_ctrl(sd, flag); - return dev->platform_data->gpio0_ctrl(sd, flag); } diff --git a/drivers/staging/media/atomisp/i2c/ov8858.c b/drivers/staging/media/atomisp/i2c/ov8858.c index 10383b8..00f2ca6 100644 --- a/drivers/staging/media/atomisp/i2c/ov8858.c +++ b/drivers/staging/media/atomisp/i2c/ov8858.c @@ -767,10 +767,6 @@ static int __gpio_ctrl(struct v4l2_subdev *sd, bool flag) if (!client || !dev || !dev->platform_data) return -ENODEV; - /* Non-gmin platforms use the legacy callback */ - if (dev->platform_data->gpio_ctrl) - return dev->platform_data->gpio_ctrl(sd, flag); - if (dev->platform_data->gpio0_ctrl) return dev->platform_data->gpio0_ctrl(sd, flag); diff --git a/drivers/staging/media/atomisp/include/linux/atomisp_platform.h b/drivers/staging/media/atomisp/include/linux/atomisp_platform.h index dbac2b7..94ddb46 100644 --- a/drivers/staging/media/atomisp/include/linux/atomisp_platform.h +++ b/drivers/staging/media/atomisp/include/linux/atomisp_platform.h @@ -205,7 +205,6 @@ struct camera_vcm_control { }; struct camera_sensor_platform_data { - int (*gpio_ctrl)(struct v4l2_subdev *subdev, int flag); int (*flisclk_ctrl)(struct v4l2_subdev *subdev, int flag); int (*power_ctrl)(struct v4l2_subdev *subdev, int flag); int (*csi_cfg)(struct v4l2_subdev *subdev, int flag); @@ -214,7 +213,6 @@ struct camera_sensor_platform_data { int (*platform_deinit)(void); char *(*msr_file_name)(void); struct atomisp_camera_caps *(*get_camera_caps)(void); - int (*gpio_intr_ctrl)(struct v4l2_subdev *subdev); /* New G-Min power and GPIO interface, replaces * power/gpio_ctrl with methods to control individual |