On Thu Mar 26 12:42:49 2026 +0200, Sakari Ailus wrote:
> Tell driver authors to use pm_runtime_get_if_active() instead of
> pm_runtime_get_if_in_use() to check the device's power state in the s_ctrl
> callback. pm_runtime_get_if_active() is the right function to use here
> since it returns non-zero if the device is powered on rather than its
> PM runtime usage_count is non-zero.
> 
> Signed-off-by: Sakari Ailus <[email protected]>
> Reviewed-by: Laurent Pinchart <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 Documentation/driver-api/media/camera-sensor.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/Documentation/driver-api/media/camera-sensor.rst 
b/Documentation/driver-api/media/camera-sensor.rst
index 94bd1dae82d5..c8552f70f496 100644
--- a/Documentation/driver-api/media/camera-sensor.rst
+++ b/Documentation/driver-api/media/camera-sensor.rst
@@ -114,7 +114,7 @@ of the device. This is because the power state of the 
device is only changed
 after the power state transition has taken place. The ``s_ctrl`` callback can 
be
 used to obtain device's power state after the power state transition:
 
-.. c:function:: int pm_runtime_get_if_in_use(struct device *dev);
+.. c:function:: int pm_runtime_get_if_active(struct device *dev);
 
 The function returns a non-zero value if it succeeded getting the power count 
or
 runtime PM was disabled, in either of which cases the driver may proceed to
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to