Commit 94c188d3 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds

[PATCH] swsusp: let userland tools switch console on suspend

Remove the console-switching code from the suspend part of the swsusp userland
interface and let the userland tools switch the console.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ff4da2e2
...@@ -139,12 +139,10 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, ...@@ -139,12 +139,10 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
if (data->frozen) if (data->frozen)
break; break;
down(&pm_sem); down(&pm_sem);
pm_prepare_console();
disable_nonboot_cpus(); disable_nonboot_cpus();
if (freeze_processes()) { if (freeze_processes()) {
thaw_processes(); thaw_processes();
enable_nonboot_cpus(); enable_nonboot_cpus();
pm_restore_console();
error = -EBUSY; error = -EBUSY;
} }
up(&pm_sem); up(&pm_sem);
...@@ -158,7 +156,6 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, ...@@ -158,7 +156,6 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
down(&pm_sem); down(&pm_sem);
thaw_processes(); thaw_processes();
enable_nonboot_cpus(); enable_nonboot_cpus();
pm_restore_console();
up(&pm_sem); up(&pm_sem);
data->frozen = 0; data->frozen = 0;
break; break;
......
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