Skip to content

Commit

Permalink
PM: Wait for console in resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arve Hjønnevåg authored and Linus Torvalds committed Feb 21, 2009
1 parent ebae260 commit b090f9f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/power/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b090f9f

Please sign in to comment.