diff options
author | Arve Hjønnevåg <arve@android.com> | 2009-02-14 02:06:17 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-21 23:17:17 +0100 |
commit | b090f9fa53d51c8a33370071de9e391919ee1fa7 (patch) | |
tree | 55cf1fe637cf4808d8139108c3d7871647dfc00f /kernel | |
parent | PM: Fix pm_notifiers during user mode hibernation (diff) | |
download | linux-b090f9fa53d51c8a33370071de9e391919ee1fa7.tar.xz linux-b090f9fa53d51c8a33370071de9e391919ee1fa7.zip |
PM: Wait for console in resume
Avoids later waking up to a blinking cursor if the device woke up and
returned to sleep before the console switch happened.
Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/console.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/power/console.c b/kernel/power/console.c index b8628be2a465..a3961b205de7 100644 --- a/kernel/power/console.c +++ b/kernel/power/console.c @@ -78,6 +78,12 @@ void pm_restore_console(void) } set_console(orig_fgconsole); release_console_sem(); + + if (vt_waitactive(orig_fgconsole)) { + pr_debug("Resume: Can't switch VCs."); + return; + } + kmsg_redirect = orig_kmsg; } #endif |