Commit 797938b5 authored by Jiri Slaby's avatar Jiri Slaby Committed by Live-CD User

tty: Power: fix suspend vt regression

vt_waitactive no longer accepts console parameter as console-1
since commit "vt: add an event interface". It expects console
number directly (as viewed by userspace -- counting from 1).

Fix a deadlock suspend regression by redefining adding one
to vt in vt_move_to_console.
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9074d963
...@@ -1757,7 +1757,7 @@ int vt_move_to_console(unsigned int vt, int alloc) ...@@ -1757,7 +1757,7 @@ int vt_move_to_console(unsigned int vt, int alloc)
return -EIO; return -EIO;
} }
release_console_sem(); release_console_sem();
if (vt_waitactive(vt)) { if (vt_waitactive(vt + 1)) {
pr_debug("Suspend: Can't switch VCs."); pr_debug("Suspend: Can't switch VCs.");
return -EINTR; return -EINTR;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment