]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Revert "PM: sleep: Make pm_wakeup_clear() call more clear"
authorSamuel Wu <wusamuel@google.com>
Wed, 22 Oct 2025 22:28:30 +0000 (22:28 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 23 Oct 2025 10:48:04 +0000 (12:48 +0200)
This reverts commit 56a232d93cea0ba14da5e3157830330756a45b4c.

The above commit changed the position of pm_wakeup_clear() for the
suspend call path, but other call paths with references to
freeze_processes() were not updated. This means that other call
paths, such as hibernate(), will not have pm_wakeup_clear() called.

Suggested-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Samuel Wu <wusamuel@google.com>
[ rjw: Changelog edits ]
Link: https://patch.msgid.link/20251022222830.634086-1-wusamuel@google.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/process.c
kernel/power/suspend.c

index 8ff68ebaa1e08ea0e17301c35453e1fac8bac620..dc0dfc349f22b4505980cfd5d3bd9cff21475987 100644 (file)
@@ -132,6 +132,7 @@ int freeze_processes(void)
        if (!pm_freezing)
                static_branch_inc(&freezer_active);
 
+       pm_wakeup_clear(0);
        pm_freezing = true;
        error = try_to_freeze_tasks(true);
        if (!error)
index 4bb4686c1c08818fa97ebb1f13813173a7c49e55..b4ca17c2fecf4d84f3194cfc6ef0b9d903d76130 100644 (file)
@@ -595,7 +595,6 @@ static int enter_state(suspend_state_t state)
        }
 
        pm_pr_dbg("Preparing system for sleep (%s)\n", mem_sleep_labels[state]);
-       pm_wakeup_clear(0);
        pm_suspend_clear_flags();
        error = suspend_prepare(state);
        if (error)