diff options
| author | Kai-Heng Feng <kai.heng.feng@canonical.com> | 2023-05-02 18:04:34 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-07 00:12:30 +0300 |
| commit | 820f84f60a9fb47540ecc505e73c436866662a82 (patch) | |
| tree | daa4ec56773278b4f689447a4c14413d63aeee24 /include/linux | |
| parent | 1d736ad183ed574566a1362f8f8c132d5f5f9cf4 (diff) | |
| download | linux-820f84f60a9fb47540ecc505e73c436866662a82.tar.xz | |
PM: suspend: Fix pm_suspend_target_state handling for !CONFIG_PM
commit 2e41e3ca4729455e002bcb585f0d3749ee66d572 upstream.
Move the pm_suspend_target_state definition for CONFIG_SUSPEND
unset from the wakeup code into the headers so as to allow it
to still be used elsewhere when CONFIG_SUSPEND is not set.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
[ rjw: Changelog and subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/suspend.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cfe19a028918..8f7f16c91479 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -199,6 +199,7 @@ struct platform_s2idle_ops { }; #ifdef CONFIG_SUSPEND +extern suspend_state_t pm_suspend_target_state; extern suspend_state_t mem_sleep_current; extern suspend_state_t mem_sleep_default; @@ -334,6 +335,8 @@ extern bool sync_on_suspend_enabled; #else /* !CONFIG_SUSPEND */ #define suspend_valid_only_mem NULL +#define pm_suspend_target_state (PM_SUSPEND_ON) + static inline void pm_suspend_clear_flags(void) {} static inline void pm_set_suspend_via_firmware(void) {} static inline void pm_set_resume_via_firmware(void) {} @@ -498,7 +501,6 @@ extern void ksys_sync_helper(void); /* drivers/base/power/wakeup.c */ extern bool events_check_enabled; -extern suspend_state_t pm_suspend_target_state; extern bool pm_wakeup_pending(void); extern void pm_system_wakeup(void); |
