From: Arve Hjønnevåg Date: Sat, 14 Feb 2009 01:06:17 +0000 (+0100) Subject: PM: Wait for console in resume X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b090f9fa53d51c8a33370071de9e391919ee1fa7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 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