diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2006-02-01 06:05:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 11:53:14 -0500 |
commit | f7b8988ff50d99c99746f65f420364e91362c065 (patch) | |
tree | ca7b0e93ea3991fe24aee2c88fe54a02f92739ea /kernel/power/console.c | |
parent | a8183ebb45324ef99f98a175623d67cdcec4466f (diff) |
[PATCH] swsusp: do not change log level during suspend/resume
Prevent the kernel from setting the log level to 10 unconditionally during
suspend/resume which was needed in the past for debugging, but generally is
undesirable.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/console.c')
-rw-r--r-- | kernel/power/console.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/kernel/power/console.c b/kernel/power/console.c index 7ff375e7c95f..579d239d129f 100644 --- a/kernel/power/console.c +++ b/kernel/power/console.c | |||
@@ -9,18 +9,11 @@ | |||
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; | ||
13 | static int orig_loglevel; | ||
14 | #ifdef SUSPEND_CONSOLE | 12 | #ifdef SUSPEND_CONSOLE |
15 | static int orig_fgconsole, orig_kmsg; | 13 | static int orig_fgconsole, orig_kmsg; |
16 | #endif | ||
17 | 14 | ||
18 | int pm_prepare_console(void) | 15 | int pm_prepare_console(void) |
19 | { | 16 | { |
20 | orig_loglevel = console_loglevel; | ||
21 | console_loglevel = new_loglevel; | ||
22 | |||
23 | #ifdef SUSPEND_CONSOLE | ||
24 | acquire_console_sem(); | 17 | acquire_console_sem(); |
25 | 18 | ||
26 | orig_fgconsole = fg_console; | 19 | orig_fgconsole = fg_console; |
@@ -41,18 +34,15 @@ int pm_prepare_console(void) | |||
41 | } | 34 | } |
42 | orig_kmsg = kmsg_redirect; | 35 | orig_kmsg = kmsg_redirect; |
43 | kmsg_redirect = SUSPEND_CONSOLE; | 36 | kmsg_redirect = SUSPEND_CONSOLE; |
44 | #endif | ||
45 | return 0; | 37 | return 0; |
46 | } | 38 | } |
47 | 39 | ||
48 | void pm_restore_console(void) | 40 | void pm_restore_console(void) |
49 | { | 41 | { |
50 | console_loglevel = orig_loglevel; | ||
51 | #ifdef SUSPEND_CONSOLE | ||
52 | acquire_console_sem(); | 42 | acquire_console_sem(); |
53 | set_console(orig_fgconsole); | 43 | set_console(orig_fgconsole); |
54 | release_console_sem(); | 44 | release_console_sem(); |
55 | kmsg_redirect = orig_kmsg; | 45 | kmsg_redirect = orig_kmsg; |
56 | #endif | ||
57 | return; | 46 | return; |
58 | } | 47 | } |
48 | #endif | ||