diff options
-rw-r--r-- | drivers/tty/Kconfig | 4 | ||||
-rw-r--r-- | include/linux/suspend.h | 9 | ||||
-rw-r--r-- | kernel/power/Makefile | 2 | ||||
-rw-r--r-- | kernel/power/console.c | 4 |
4 files changed, 12 insertions, 7 deletions
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig index bd7cc0527999..a7188a0b68eb 100644 --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig | |||
@@ -60,6 +60,10 @@ config VT_CONSOLE | |||
60 | 60 | ||
61 | If unsure, say Y. | 61 | If unsure, say Y. |
62 | 62 | ||
63 | config VT_CONSOLE_SLEEP | ||
64 | def_bool y | ||
65 | depends on VT_CONSOLE && PM_SLEEP | ||
66 | |||
63 | config HW_CONSOLE | 67 | config HW_CONSOLE |
64 | bool | 68 | bool |
65 | depends on VT && !S390 && !UML | 69 | depends on VT && !S390 && !UML |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 46f3548aef2d..57a692432f8a 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -8,15 +8,18 @@ | |||
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
10 | 10 | ||
11 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) | 11 | #ifdef CONFIG_VT |
12 | extern void pm_set_vt_switch(int); | 12 | extern void pm_set_vt_switch(int); |
13 | extern int pm_prepare_console(void); | ||
14 | extern void pm_restore_console(void); | ||
15 | #else | 13 | #else |
16 | static inline void pm_set_vt_switch(int do_switch) | 14 | static inline void pm_set_vt_switch(int do_switch) |
17 | { | 15 | { |
18 | } | 16 | } |
17 | #endif | ||
19 | 18 | ||
19 | #ifdef CONFIG_VT_CONSOLE_SLEEP | ||
20 | extern int pm_prepare_console(void); | ||
21 | extern void pm_restore_console(void); | ||
22 | #else | ||
20 | static inline int pm_prepare_console(void) | 23 | static inline int pm_prepare_console(void) |
21 | { | 24 | { |
22 | return 0; | 25 | return 0; |
diff --git a/kernel/power/Makefile b/kernel/power/Makefile index ad6bdd8b401a..07e0e28ffba7 100644 --- a/kernel/power/Makefile +++ b/kernel/power/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | ccflags-$(CONFIG_PM_DEBUG) := -DDEBUG | 2 | ccflags-$(CONFIG_PM_DEBUG) := -DDEBUG |
3 | 3 | ||
4 | obj-$(CONFIG_PM) += main.o qos.o | 4 | obj-$(CONFIG_PM) += main.o qos.o |
5 | obj-$(CONFIG_PM_SLEEP) += console.o | 5 | obj-$(CONFIG_VT_CONSOLE_SLEEP) += console.o |
6 | obj-$(CONFIG_FREEZER) += process.o | 6 | obj-$(CONFIG_FREEZER) += process.o |
7 | obj-$(CONFIG_SUSPEND) += suspend.o | 7 | obj-$(CONFIG_SUSPEND) += suspend.o |
8 | obj-$(CONFIG_PM_TEST_SUSPEND) += suspend_test.o | 8 | obj-$(CONFIG_PM_TEST_SUSPEND) += suspend_test.o |
diff --git a/kernel/power/console.c b/kernel/power/console.c index 218e5af90156..b1dc456474b5 100644 --- a/kernel/power/console.c +++ b/kernel/power/console.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/power/process.c - Functions for saving/restoring console. | 2 | * Functions for saving/restoring console. |
3 | * | 3 | * |
4 | * Originally from swsusp. | 4 | * Originally from swsusp. |
5 | */ | 5 | */ |
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include "power.h" | 11 | #include "power.h" |
12 | 12 | ||
13 | #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) | ||
14 | #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1) | 13 | #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1) |
15 | 14 | ||
16 | static int orig_fgconsole, orig_kmsg; | 15 | static int orig_fgconsole, orig_kmsg; |
@@ -32,4 +31,3 @@ void pm_restore_console(void) | |||
32 | vt_kmsg_redirect(orig_kmsg); | 31 | vt_kmsg_redirect(orig_kmsg); |
33 | } | 32 | } |
34 | } | 33 | } |
35 | #endif | ||