summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2009-02-14 01:06:17 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-21 22:17:17 (GMT)
commitb090f9fa53d51c8a33370071de9e391919ee1fa7 (patch)
tree55cf1fe637cf4808d8139108c3d7871647dfc00f
parentebae2604f2c3693717d9dc687c84578f0526480c (diff)
downloadlinux-b090f9fa53d51c8a33370071de9e391919ee1fa7.tar.xz
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>
-rw-r--r--kernel/power/console.c6
1 files changed, 6 insertions, 0 deletions
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