[PATCH 8/9] media: i2c: ov5645: Switch to RUNTIME_PM_OPS() and pm_ptr()

From: Tommaso Merciai

Date: Tue Jun 16 2026 - 13:16:28 EST


Replace SET_RUNTIME_PM_OPS() with RUNTIME_PM_OPS() and use pm_ptr()
for the power management operations. This brings the driver in line
with current kernel power management APIs and prepares for future
deprecations.

Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@xxxxxxxxxxxxxx>
---
drivers/media/i2c/ov5645.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
index c772ef6e51d2..14692d128571 100644
--- a/drivers/media/i2c/ov5645.c
+++ b/drivers/media/i2c/ov5645.c
@@ -1231,14 +1231,14 @@ static const struct of_device_id ov5645_of_match[] = {
MODULE_DEVICE_TABLE(of, ov5645_of_match);

static const struct dev_pm_ops ov5645_pm_ops = {
- SET_RUNTIME_PM_OPS(ov5645_set_power_off, ov5645_set_power_on, NULL)
+ RUNTIME_PM_OPS(ov5645_set_power_off, ov5645_set_power_on, NULL)
};

static struct i2c_driver ov5645_i2c_driver = {
.driver = {
.of_match_table = ov5645_of_match,
.name = "ov5645",
- .pm = &ov5645_pm_ops,
+ .pm = pm_ptr(&ov5645_pm_ops),
},
.probe = ov5645_probe,
.remove = ov5645_remove,
--
2.54.0