Skip to content

Commit

Permalink
Documentation: PM: Clarify pm_runtime_resume_and_get() return value
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pbrkr authored and rafaeljw committed Dec 10, 2024
1 parent fac04ef commit ccb84dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/power/runtime_pm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:

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

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

0 comments on commit ccb84dc

Please sign in to comment.