]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PM: sleep: Adjust check before setting power.must_resume
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 27 Feb 2025 10:53:50 +0000 (11:53 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 3 Mar 2025 13:31:47 +0000 (14:31 +0100)
commiteeb87d17aceab7803a5a5bcb6cf2817b745157cf
tree63bc2ff2cd8a3f1a0e8d6754acac234611c6749d
parent630d55e038728f6f5917da051984a5ec515d152e
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
drivers/base/power/main.c
drivers/base/power/runtime.c
include/linux/pm_runtime.h