projects/linux·commit b090f9fa

PM: Wait for console in resume

b090f9fa · Arve Hjønnevåg <[email protected]> · 2009-02-14 02:06:17 +01:00

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 <[email protected]>
Signed-off-by: Arve Hjønnevåg <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
b090f9fa53d51c8a33370071de9e391919ee1fa7
Parents
ebae2604

Changes

1 files changed · +6 −0

FileStatusAddDelContent
kernel/power/console.cmodified+6−0View file

kernel/power/console.c

View file
diff --git a/kernel/power/console.c b/kernel/power/console.c
index b8628be..a3961b2 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