diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 04:29:00 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 04:29:00 -0500 |
commit | 9caafa6c8686e319cf4d5f3757b3972c6c522b7c (patch) | |
tree | b38979b835b5d22e681b175d0b98a3c7560d9c59 /kernel/power/console.c | |
parent | 51e9f2ff83df6b1c81c5c44f4486c68ed87aa20e (diff) | |
parent | cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (diff) |
Merge branch 'upstream-fixes'
Diffstat (limited to 'kernel/power/console.c')
-rw-r--r-- | kernel/power/console.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/kernel/power/console.c b/kernel/power/console.c index 7ff375e7c95f..623786d44159 100644 --- a/kernel/power/console.c +++ b/kernel/power/console.c | |||
@@ -9,18 +9,13 @@ | |||
9 | #include <linux/console.h> | 9 | #include <linux/console.h> |
10 | #include "power.h" | 10 | #include "power.h" |
11 | 11 | ||
12 | static int new_loglevel = 10; | 12 | #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) |
13 | static int orig_loglevel; | 13 | #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1) |
14 | #ifdef SUSPEND_CONSOLE | 14 | |
15 | static int orig_fgconsole, orig_kmsg; | 15 | static int orig_fgconsole, orig_kmsg; |
16 | #endif | ||
17 | 16 | ||
18 | int pm_prepare_console(void) | 17 | int pm_prepare_console(void) |
19 | { | 18 | { |
20 | orig_loglevel = console_loglevel; | ||
21 | console_loglevel = new_loglevel; | ||
22 | |||
23 | #ifdef SUSPEND_CONSOLE | ||
24 | acquire_console_sem(); | 19 | acquire_console_sem(); |
25 | 20 | ||
26 | orig_fgconsole = fg_console; | 21 | orig_fgconsole = fg_console; |
@@ -41,18 +36,15 @@ int pm_prepare_console(void) | |||
41 | } | 36 | } |
42 | orig_kmsg = kmsg_redirect; | 37 | orig_kmsg = kmsg_redirect; |
43 | kmsg_redirect = SUSPEND_CONSOLE; | 38 | kmsg_redirect = SUSPEND_CONSOLE; |
44 | #endif | ||
45 | return 0; | 39 | return 0; |
46 | } | 40 | } |
47 | 41 | ||
48 | void pm_restore_console(void) | 42 | void pm_restore_console(void) |
49 | { | 43 | { |
50 | console_loglevel = orig_loglevel; | ||
51 | #ifdef SUSPEND_CONSOLE | ||
52 | acquire_console_sem(); | 44 | acquire_console_sem(); |
53 | set_console(orig_fgconsole); | 45 | set_console(orig_fgconsole); |
54 | release_console_sem(); | 46 | release_console_sem(); |
55 | kmsg_redirect = orig_kmsg; | 47 | kmsg_redirect = orig_kmsg; |
56 | #endif | ||
57 | return; | 48 | return; |
58 | } | 49 | } |
50 | #endif | ||