]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:57 +0000 (14:31 +0200)
commit24045932e7e0892060e66e99814487faa087fc48
tree4b0ba25686dc64548bbd2323fe25f9483645dc37
parent3914a222d6733c8c4b37c0c57c5bbb4b4fc989a2
PM: sleep: Adjust check before setting power.must_resume

[ Upstream commit eeb87d17aceab7803a5a5bcb6cf2817b745157cf ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/power/main.c
drivers/base/power/runtime.c
include/linux/pm_runtime.h