diff mbox series

um: fix build w/o CONFIG_PM_SLEEP

Message ID 20201214205101.27cb3eb8d19a.Ic09b2e3a99bc19009d85516f857e6c38d31edc00@changeid
State Accepted
Headers show
Series um: fix build w/o CONFIG_PM_SLEEP | expand

Commit Message

Johannes Berg Dec. 14, 2020, 7:51 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

uml_pm_wake() is unconditionally called from the SIGUSR1 wakeup
handler since that's in the userspace portion of UML, and thus
a bit tricky to ifdef out. Since pm_system_wakeup() can always
be called (but may be an empty inline), also simply always have
uml_pm_wake() to fix the build.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 arch/um/kernel/um_arch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 9c7e6d7ea1b3..31d356b1ffd8 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -379,12 +379,12 @@  void text_poke_sync(void)
 {
 }
 
-#ifdef CONFIG_PM_SLEEP
 void uml_pm_wake(void)
 {
 	pm_system_wakeup();
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int um_suspend_valid(suspend_state_t state)
 {
 	return state == PM_SUSPEND_MEM;