[PATCH 3/5] Use vt_get_kmsg_redirect() and vt_set_kmsg_redirect()

From: Bernhard Walle
Date: Sat Oct 10 2009 - 16:53:06 EST


Although the only code file where kmsg_redirect is used (power/console.c) is
already protected by CONFIG_VT_CONSOLE, we use the new interface here
to be able to make kmsg_redirect static.


Signed-off-by: Bernhard Walle <bernhard@xxxxxxxxx>
---
kernel/power/console.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/power/console.c b/kernel/power/console.c
index 5187136..df959d7 100644
--- a/kernel/power/console.c
+++ b/kernel/power/console.c
@@ -6,7 +6,7 @@

#include <linux/vt_kern.h>
#include <linux/kbd_kern.h>
-#include <linux/console.h>
+#include <linux/vt.h>
#include <linux/module.h>
#include "power.h"

@@ -21,8 +21,8 @@ int pm_prepare_console(void)
if (orig_fgconsole < 0)
return 1;

- orig_kmsg = kmsg_redirect;
- kmsg_redirect = SUSPEND_CONSOLE;
+ orig_kmsg = vt_get_kmsg_redirect();
+ vt_set_kmsg_redirect(SUSPEND_CONSOLE);
return 0;
}

@@ -30,7 +30,7 @@ void pm_restore_console(void)
{
if (orig_fgconsole >= 0) {
vt_move_to_console(orig_fgconsole, 0);
- kmsg_redirect = orig_kmsg;
+ vt_set_kmsg_redirect(orig_kmsg);
}
}
#endif
--
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/