mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
20ea6adbf1
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
90 lines
2.3 KiB
Diff
90 lines
2.3 KiB
Diff
From 27a8c7902543676a670424b28fb9b43c6c4ce59b Mon Sep 17 00:00:00 2001
|
|
From: Daniel Scally <djrscally@gmail.com>
|
|
Date: Tue, 15 Feb 2022 23:07:36 +0000
|
|
Subject: [PATCH] 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: Daniel Scally <djrscally@gmail.com>
|
|
Reported-by: kernel test robot <lkp@intel.com>
|
|
---
|
|
drivers/media/i2c/ov7251.c | 44 +-------------------------------------
|
|
1 file changed, 1 insertion(+), 43 deletions(-)
|
|
|
|
--- a/drivers/media/i2c/ov7251.c
|
|
+++ b/drivers/media/i2c/ov7251.c
|
|
@@ -903,43 +903,6 @@ static int __maybe_unused ov7251_sensor_
|
|
return ov7251_set_power_on(ov7251);
|
|
}
|
|
|
|
-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);
|
|
- 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);
|
|
- goto exit;
|
|
- }
|
|
-
|
|
- ov7251->power_on = true;
|
|
- } else {
|
|
- ov7251_set_power_off(ov7251);
|
|
- 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;
|
|
@@ -1384,10 +1347,6 @@ exit:
|
|
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,
|
|
@@ -1405,7 +1364,6 @@ static const struct v4l2_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,
|
|
};
|
|
@@ -1701,7 +1659,7 @@ err_pm_runtime:
|
|
pm_runtime_disable(ov7251->dev);
|
|
pm_runtime_put_noidle(ov7251->dev);
|
|
power_down:
|
|
- ov7251_s_power(&ov7251->sd, false);
|
|
+ ov7251_set_power_off(ov7251);
|
|
free_entity:
|
|
media_entity_cleanup(&ov7251->sd.entity);
|
|
free_ctrl:
|