]> 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:39:11 +0000 (14:39 +0200)
commit31d5665172b38e54f6e38b91409cc98be64da896
treeedc29d07510deda3d7809d527eaf66f6c443a32d
parent4d28c2ab2af5d04c8ad4e5f761093a7c30349e98
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