aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/console.c')
-rw-r--r--kernel/power/console.c12
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
12static int new_loglevel = 10;
13static int orig_loglevel;
14#ifdef SUSPEND_CONSOLE 12#ifdef SUSPEND_CONSOLE
15static int orig_fgconsole, orig_kmsg; 13static int orig_fgconsole, orig_kmsg;
16#endif
17 14
18int pm_prepare_console(void) 15int 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
48void pm_restore_console(void) 40void 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