Skip to content

Commit ccb84dc

Browse files
pbrkrrafaeljw
authored andcommitted
Documentation: PM: Clarify pm_runtime_resume_and_get() return value
Update the documentation to match the behaviour of the code. pm_runtime_resume_and_get() always returns 0 on success, even if __pm_runtime_resume() returns 1. Fixes: 2c41233 ("PM: runtime: Add documentation for pm_runtime_resume_and_get()") Signed-off-by: Paul Barker <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Subject and changelog edits, adjusted new comment formatting ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent fac04ef commit ccb84dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/power/runtime_pm.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
347347

348348
`int pm_runtime_resume_and_get(struct device *dev);`
349349
- run pm_runtime_resume(dev) and if successful, increment the device's
350-
usage counter; return the result of pm_runtime_resume
350+
usage counter; returns 0 on success (whether or not the device's
351+
runtime PM status was already 'active') or the error code from
352+
pm_runtime_resume() on failure.
351353

352354
`int pm_request_idle(struct device *dev);`
353355
- submit a request to execute the subsystem-level idle callback for the

0 commit comments

Comments
 (0)