From: Arve Hjønnevåg Date: Sat, 14 Feb 2009 01:06:17 +0000 (+0100) Subject: PM: Wait for console in resume X-Git-Tag: v2.6.29-rc6~13^2~1 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=b090f9fa53d51c8a33370071de9e391919ee1fa7 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 Signed-off-by: Arve Hjønnevåg Signed-off-by: Rafael J. Wysocki Cc: Len Brown Cc: Greg KH Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/console.c b/kernel/power/console.c index b8628be..a3961b20 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