diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-02-27 11:53:50 +0100 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-03-03 14:31:47 +0100 |
| commit | eeb87d17aceab7803a5a5bcb6cf2817b745157cf (patch) | |
| tree | 63bc2ff2cd8a3f1a0e8d6754acac234611c6749d /include/linux | |
| parent | 630d55e038728f6f5917da051984a5ec515d152e (diff) | |
PM: sleep: Adjust check before setting power.must_resume
The check before setting power.must_resume in device_suspend_noirq()
does not take power.child_count into account, but it should do that, so
use pm_runtime_need_not_resume() in it for this purpose and adjust the
comment next to it accordingly.
Fixes: 107d47b2b95e ("PM: sleep: core: Simplify the SMART_SUSPEND flag handling")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/3353728.44csPzL39Z@rjwysocki.net
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pm_runtime.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 01ead602aedd..4c5b74b745d5 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -66,6 +66,7 @@ static inline bool queue_pm_work(struct work_struct *work) extern int pm_generic_runtime_suspend(struct device *dev); extern int pm_generic_runtime_resume(struct device *dev); +extern bool pm_runtime_need_not_resume(struct device *dev); extern int pm_runtime_force_suspend(struct device *dev); extern int pm_runtime_force_resume(struct device *dev); @@ -244,6 +245,7 @@ static inline bool queue_pm_work(struct work_struct *work) { return false; } static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } +static inline bool pm_runtime_need_not_resume(struct device *dev) {return true; } static inline int pm_runtime_force_suspend(struct device *dev) { return 0; } static inline int pm_runtime_force_resume(struct device *dev) { return 0; } |
