Commit 9e1d3012 authored by Daniel Scally's avatar Daniel Scally Committed by Mauro Carvalho Chehab

media: i2c: Remove .s_power() from ov7251

The .s_power() callback is deprecated, and now that we have pm_runtime
functionality in the driver there's no further use for it. Delete the
function.
Signed-off-by: default avatarDaniel Scally <djrscally@gmail.com>
Acked-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@kernel.org>
parent 207f4162
......@@ -910,7 +910,16 @@ static int ov7251_set_power_on(struct device *dev)
DIV_ROUND_UP(ov7251->xclk_freq, 1000));
usleep_range(wait_us, wait_us + 1000);
return 0;
ret = ov7251_set_register_array(ov7251,
ov7251_global_init_setting,
ARRAY_SIZE(ov7251_global_init_setting));
if (ret < 0) {
dev_err(ov7251->dev, "error during global init\n");
ov7251_regulators_disable(ov7251);
return ret;
}
return ret;
}
static int ov7251_set_power_off(struct device *dev)
......@@ -926,43 +935,6 @@ static int ov7251_set_power_off(struct device *dev)
return 0;
}
static int ov7251_s_power(struct v4l2_subdev *sd, int on)
{
struct ov7251 *ov7251 = to_ov7251(sd);
int ret = 0;
mutex_lock(&ov7251->lock);
/* If the power state is not modified - no work to do. */
if (ov7251->power_on == !!on)
goto exit;
if (on) {
ret = ov7251_set_power_on(ov7251->dev);
if (ret < 0)
goto exit;
ret = ov7251_set_register_array(ov7251,
ov7251_global_init_setting,
ARRAY_SIZE(ov7251_global_init_setting));
if (ret < 0) {
dev_err(ov7251->dev, "could not set init registers\n");
ov7251_set_power_off(ov7251->dev);
goto exit;
}
ov7251->power_on = true;
} else {
ov7251_set_power_off(ov7251->dev);
ov7251->power_on = false;
}
exit:
mutex_unlock(&ov7251->lock);
return ret;
}
static int ov7251_set_hflip(struct ov7251 *ov7251, s32 value)
{
u8 val = ov7251->timing_format2;
......@@ -1387,10 +1359,6 @@ static int ov7251_set_frame_interval(struct v4l2_subdev *subdev,
return ret;
}
static const struct v4l2_subdev_core_ops ov7251_core_ops = {
.s_power = ov7251_s_power,
};
static const struct v4l2_subdev_video_ops ov7251_video_ops = {
.s_stream = ov7251_s_stream,
.g_frame_interval = ov7251_get_frame_interval,
......@@ -1408,7 +1376,6 @@ static const struct v4l2_subdev_pad_ops ov7251_subdev_pad_ops = {
};
static const struct v4l2_subdev_ops ov7251_subdev_ops = {
.core = &ov7251_core_ops,
.video = &ov7251_video_ops,
.pad = &ov7251_subdev_pad_ops,
};
......
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