acee358dd7ce45c744b76a5d8aeb06e5ebc1516e
[openwrt/openwrt.git] / target / linux / uml / patches-5.10 / 001-um-Fix-build-w-o-CONFIG_PM_SLEEP.patch
1 From 1fb1abc83636f5329c26cd29f0f19f3faeb697a5 Mon Sep 17 00:00:00 2001
2 From: Johannes Berg <johannes.berg@intel.com>
3 Date: Mon, 14 Dec 2020 20:51:02 +0100
4 Subject: [PATCH] um: Fix build w/o CONFIG_PM_SLEEP
5
6 uml_pm_wake() is unconditionally called from the SIGUSR1 wakeup
7 handler since that's in the userspace portion of UML, and thus
8 a bit tricky to ifdef out. Since pm_system_wakeup() can always
9 be called (but may be an empty inline), also simply always have
10 uml_pm_wake() to fix the build.
11
12 Reported-by: Randy Dunlap <rdunlap@infradead.org>
13 Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
14 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
15 Signed-off-by: Richard Weinberger <richard@nod.at>
16 ---
17 --- a/arch/um/kernel/um_arch.c
18 +++ b/arch/um/kernel/um_arch.c
19 @@ -387,12 +387,12 @@ void text_poke_sync(void)
20 {
21 }
22
23 -#ifdef CONFIG_PM_SLEEP
24 void uml_pm_wake(void)
25 {
26 pm_system_wakeup();
27 }
28
29 +#ifdef CONFIG_PM_SLEEP
30 static int init_pm_wake_signal(void)
31 {
32 /*