diff options
| author | Brian Norris <briannorris@chromium.org> | 2026-10-06 16:13:35 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-10-13 15:37:36 +0200 |
| commit | b8cb5f7f6de5dc33e82a477e5c81a965949f829c (patch) | |
| tree | 96f5ad3889f90be7d1f734ceb9d6e6ae3df2600e /tools/lib/python | |
| parent | b269cadb8e3d23b6f34030fb03b5c322b6ba19fe (diff) | |
greybus: Discard pm_runtime_put_autosuspend() return value
Returning an error code from pm_runtime_put_autosuspend() merely means
that it has not queued up a timer or work item to check whether or not
the device can be suspended and there are many perfectly valid
situations in which that can happen, like after writing "on" to the
device's runtime PM "control" attribute in sysfs for one example.
Modify gb_pm_runtime_put_autosuspend() to discard the
pm_runtime_put_autosuspend() return value, change its return type to
void, and update its caller in the Greybus power supply driver
accordingly. Also drop the redundant pm_runtime_mark_last_busy() call
from gb_pm_runtime_put_autosuspend() while we're here, as this is
already part of pm_runtime_put_autosuspend().
Note that this resolves a bug in the power_supply driver: in tracking
'gbpsy->pm_acquired', it erroneously assumed that
pm_runtime_put_autosuspend() would not release a refcount when it
returned a non-zero value. That's a false assumption.
This will facilitate a planned change of the
pm_runtime_put_autosuspend() return type to void in the future, similar
to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
type to void").
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20261006161337.7.Ib0925681ca623093ddf812cc4de848e10ec07c73@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
