diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-09-27 14:25:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-10-31 06:22:02 -0400 |
commit | ab9a68834a43c6a6b30d835268615a0c7734515e (patch) | |
tree | 25c7297e3610606068f9726bf4e2897bacc3953a /drivers/staging | |
parent | 32471bdaa28291e18108d91f7b1c56b68e032c03 (diff) | |
download | linux-stable-ab9a68834a43c6a6b30d835268615a0c7734515e.tar.gz linux-stable-ab9a68834a43c6a6b30d835268615a0c7734515e.tar.bz2 linux-stable-ab9a68834a43c6a6b30d835268615a0c7734515e.zip |
media: staging: atomisp: Remove ->power_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')
8 files changed, 4 insertions, 32 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c index 70cc041f549c..5d2fe23347a1 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c @@ -737,10 +737,6 @@ static int power_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->power_ctrl) - return dev->platform_data->power_ctrl(sd, flag); - if (flag) { /* The upstream module driver (written to Crystal * Cove) had this logic to pulse the rails low first. diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index 9a97db696f55..ccbc3df92dff 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -547,10 +547,6 @@ static int power_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->power_ctrl) - return dev->platform_data->power_ctrl(sd, flag); - if (flag) { ret = dev->platform_data->v1p8_ctrl(sd, 1); usleep_range(60, 90); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index 81f90bc3f4e2..7c3ecc6f2c65 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c @@ -454,10 +454,6 @@ static int power_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->power_ctrl) - return dev->platform_data->power_ctrl(sd, flag); - if (flag) { ret = dev->platform_data->v2p8_ctrl(sd, 1); if (ret == 0) { diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c index 041e30f75817..588bc0b15411 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c @@ -846,10 +846,6 @@ static int power_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->power_ctrl) - return dev->platform_data->power_ctrl(sd, flag); - if (flag) { ret |= dev->platform_data->v1p8_ctrl(sd, 1); ret |= dev->platform_data->v2p8_ctrl(sd, 1); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c index 80f6aa0472ce..50ee36da7109 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c @@ -650,10 +650,6 @@ static int power_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->power_ctrl) - return dev->platform_data->power_ctrl(sd, flag); - if (flag) { ret = dev->platform_data->v1p8_ctrl(sd, 1); if (ret == 0) { diff --git a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c index 8091817dead6..d45a810cfcee 100644 --- a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c +++ b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c @@ -1297,10 +1297,6 @@ static int power_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->power_ctrl) - return dev->platform_data->power_ctrl(sd, flag); - /* This driver assumes "internal DVDD, PWDNB tied to DOVDD". * In this set up only gpio0 (XSHUTDN) should be available * but in some products (for example ECS) gpio1 (PWDNB) is diff --git a/drivers/staging/media/atomisp/i2c/ov8858.c b/drivers/staging/media/atomisp/i2c/ov8858.c index 00f2ca6ab939..75f64d1a5f77 100644 --- a/drivers/staging/media/atomisp/i2c/ov8858.c +++ b/drivers/staging/media/atomisp/i2c/ov8858.c @@ -712,10 +712,6 @@ static int __power_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->power_ctrl) - return dev->platform_data->power_ctrl(sd, flag); - if (dev->platform_data->v1p2_ctrl) { ret = dev->platform_data->v1p2_ctrl(sd, flag); if (ret) { diff --git a/drivers/staging/media/atomisp/include/linux/atomisp_platform.h b/drivers/staging/media/atomisp/include/linux/atomisp_platform.h index 94ddb46d415b..5ce8678dacf3 100644 --- a/drivers/staging/media/atomisp/include/linux/atomisp_platform.h +++ b/drivers/staging/media/atomisp/include/linux/atomisp_platform.h @@ -206,7 +206,6 @@ struct camera_vcm_control { struct camera_sensor_platform_data { 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); bool (*low_fps)(void); int (*platform_init)(struct i2c_client *); @@ -214,9 +213,10 @@ struct camera_sensor_platform_data { char *(*msr_file_name)(void); struct atomisp_camera_caps *(*get_camera_caps)(void); - /* New G-Min power and GPIO interface, replaces - * power/gpio_ctrl with methods to control individual - * lines as implemented on all known camera modules. */ + /* + * New G-Min power and GPIO interface to control individual + * lines as implemented on all known camera modules. + */ int (*gpio0_ctrl)(struct v4l2_subdev *subdev, int on); int (*gpio1_ctrl)(struct v4l2_subdev *subdev, int on); int (*v1p8_ctrl)(struct v4l2_subdev *subdev, int on); |