Commit 32471bda authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mauro Carvalho Chehab

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent d2cde883
...@@ -771,10 +771,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -771,10 +771,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
if (!dev || !dev->platform_data) if (!dev || !dev->platform_data)
return -ENODEV; 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" */ /* GPIO0 == "reset" (active low), GPIO1 == "power down" */
if (flag) { if (flag) {
/* Pulse reset, then release power down */ /* Pulse reset, then release power down */
......
...@@ -571,10 +571,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -571,10 +571,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
if (!dev || !dev->platform_data) if (!dev || !dev->platform_data)
return -ENODEV; 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); ret |= dev->platform_data->gpio1_ctrl(sd, !flag);
usleep_range(60, 90); usleep_range(60, 90);
return dev->platform_data->gpio0_ctrl(sd, flag); return dev->platform_data->gpio0_ctrl(sd, flag);
......
...@@ -480,10 +480,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -480,10 +480,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
if (!dev || !dev->platform_data) if (!dev || !dev->platform_data)
return -ENODEV; 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#), /* Note: current modules wire only one GPIO signal (RESET#),
* but the schematic wires up two to the connector. BIOS * but the schematic wires up two to the connector. BIOS
* versions have been unfortunately inconsistent with which * versions have been unfortunately inconsistent with which
......
...@@ -871,10 +871,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -871,10 +871,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
if (!dev || !dev->platform_data) if (!dev || !dev->platform_data)
return -ENODEV; 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 /* The OV2680 documents only one GPIO input (#XSHUTDN), but
* existing integrations often wire two (reset/power_down) * existing integrations often wire two (reset/power_down)
* because that is the way other sensors work. There is no * because that is the way other sensors work. There is no
......
...@@ -677,10 +677,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -677,10 +677,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
if (!dev || !dev->platform_data) if (!dev || !dev->platform_data)
return -ENODEV; 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# /* Note: the GPIO order is asymmetric: always RESET#
* before PWDN# when turning it on or off. * before PWDN# when turning it on or off.
*/ */
......
...@@ -1332,10 +1332,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -1332,10 +1332,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
if (!dev || !dev->platform_data) if (!dev || !dev->platform_data)
return -ENODEV; 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); return dev->platform_data->gpio0_ctrl(sd, flag);
} }
......
...@@ -767,10 +767,6 @@ static int __gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -767,10 +767,6 @@ static int __gpio_ctrl(struct v4l2_subdev *sd, bool flag)
if (!client || !dev || !dev->platform_data) if (!client || !dev || !dev->platform_data)
return -ENODEV; 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) if (dev->platform_data->gpio0_ctrl)
return dev->platform_data->gpio0_ctrl(sd, flag); return dev->platform_data->gpio0_ctrl(sd, flag);
......
...@@ -205,7 +205,6 @@ struct camera_vcm_control { ...@@ -205,7 +205,6 @@ struct camera_vcm_control {
}; };
struct camera_sensor_platform_data { struct camera_sensor_platform_data {
int (*gpio_ctrl)(struct v4l2_subdev *subdev, int flag);
int (*flisclk_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 (*power_ctrl)(struct v4l2_subdev *subdev, int flag);
int (*csi_cfg)(struct v4l2_subdev *subdev, int flag); int (*csi_cfg)(struct v4l2_subdev *subdev, int flag);
...@@ -214,7 +213,6 @@ struct camera_sensor_platform_data { ...@@ -214,7 +213,6 @@ struct camera_sensor_platform_data {
int (*platform_deinit)(void); int (*platform_deinit)(void);
char *(*msr_file_name)(void); char *(*msr_file_name)(void);
struct atomisp_camera_caps *(*get_camera_caps)(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 /* New G-Min power and GPIO interface, replaces
* power/gpio_ctrl with methods to control individual * power/gpio_ctrl with methods to control individual
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment