mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bernhard Walle <bernhard@bwalle.de>
To: akpm@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, Bernhard Walle <bernhard@bwalle.de>
Subject: [PATCH 3/5] Use vt_get_kmsg_redirect() and vt_set_kmsg_redirect()
Date: Sat, 10 Oct 2009 22:51:08 +0200	[thread overview]
Message-ID: <1255207870-24496-4-git-send-email-bernhard@bwalle.de> (raw)
In-Reply-To: <1255207870-24496-1-git-send-email-bernhard@bwalle.de>

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@bwalle.de>
---
 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


  parent reply	other threads:[~2009-10-10 20:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-10 20:51 Always print panic message on current console Bernhard Walle
2009-10-10 20:51 ` [PATCH 1/5] Only define/declare kmsg_redirect when CONFIG_VT_CONSOLE is set Bernhard Walle
2009-10-10 22:56   ` Alan Cox
2009-10-10 20:51 ` [PATCH 2/5] Add setter/getter interface for kmsg_redirect Bernhard Walle
2009-10-10 22:58   ` Alan Cox
2009-10-10 20:51 ` Bernhard Walle [this message]
2009-10-10 23:06   ` [PATCH 3/5] Use vt_get_kmsg_redirect() and vt_set_kmsg_redirect() Alan Cox
2009-10-10 23:25     ` Alan Cox
2009-10-10 20:51 ` [PATCH 4/5] Make kmsg_redirect static Bernhard Walle
2009-10-10 20:51 ` [PATCH 5/5] Always print panic message on current console Bernhard Walle
2009-10-12 17:36   ` Andi Kleen
2009-10-12 18:24     ` Bernhard Walle
2009-10-12 18:30       ` Jesse Barnes
2009-10-12 18:34         ` Bernhard Walle
2009-10-14  0:02           ` Jason Wessel
2009-10-12 18:42         ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1255207870-24496-4-git-send-email-bernhard@bwalle.de \
    --to=bernhard@bwalle.de \
    --cc=akpm@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®