]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: Documentation: Use right function to test device power state
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 26 Mar 2026 10:42:49 +0000 (12:42 +0200)
committerSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 6 May 2026 09:40:10 +0000 (12:40 +0300)
commitd9f8489c4325607d8a7c4a2860ce8c72a9874ff1
treeade9ce6a86915bb281b12b6c4909c3bdb9947ed7
parent0b42657bea6ba635226e8ef551076d024ceacdc9
media: Documentation: Use right function to test device power state

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 <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Documentation/driver-api/media/camera-sensor.rst