summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2009-02-14 02:06:17 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-21 14:17:17 -0800
commitb090f9fa53d51c8a33370071de9e391919ee1fa7 (patch)
tree55cf1fe637cf4808d8139108c3d7871647dfc00f /kernel
parentebae2604f2c3693717d9dc687c84578f0526480c (diff)
downloadblackbird-op-linux-b090f9fa53d51c8a33370071de9e391919ee1fa7.tar.gz
blackbird-op-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.c6
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
OpenPOWER on IntegriCloud