[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231211175023.1680247-9-mike.rudenko@gmail.com>
Date: Mon, 11 Dec 2023 20:50:11 +0300
From: Mikhail Rudenko <mike.rudenko@...il.com>
To: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Sakari Ailus <sakari.ailus@...ux.intel.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Jacopo Mondi <jacopo@...ndi.org>,
Tommaso Merciai <tommaso.merciai@...rulasolutions.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Mikhail Rudenko <mike.rudenko@...il.com>
Subject: [PATCH 08/19] media: i2c: ov4689: Enable runtime PM before registering sub-device
As the sensor may be accessible right after its async sub-device is
registered, enable runtime PM before doing so.
Signed-off-by: Mikhail Rudenko <mike.rudenko@...il.com>
---
drivers/media/i2c/ov4689.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
index 2eef64cd0070..ba33b0ced532 100644
--- a/drivers/media/i2c/ov4689.c
+++ b/drivers/media/i2c/ov4689.c
@@ -874,16 +874,16 @@ static int ov4689_probe(struct i2c_client *client)
goto err_clean_entity;
}
+ pm_runtime_set_active(dev);
+ pm_runtime_enable(dev);
+ pm_runtime_idle(dev);
+
ret = v4l2_async_register_subdev_sensor(sd);
if (ret) {
dev_err(dev, "v4l2 async register subdev failed\n");
goto err_clean_subdev;
}
- pm_runtime_set_active(dev);
- pm_runtime_enable(dev);
- pm_runtime_idle(dev);
-
return 0;
err_clean_subdev:
--
2.43.0
Powered by blists - more mailing lists