summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/user.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c
index d65305b515b1..09468ec61124 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -181,34 +181,25 @@ static inline int snapshot_suspend(int platform_suspend)
return error;
}
-static inline int snapshot_restore(int platform_suspend)
+static inline int snapshot_restore(void)
{
int error;
mutex_lock(&pm_mutex);
pm_prepare_console();
- if (platform_suspend) {
- error = platform_prepare();
- if (error)
- goto Finish;
- }
suspend_console();
error = device_suspend(PMSG_PRETHAW);
if (error)
- goto Resume_devices;
+ goto Finish;
error = disable_nonboot_cpus();
if (!error)
error = swsusp_resume();
enable_nonboot_cpus();
- Resume_devices:
- if (platform_suspend)
- platform_finish();
-
+ Finish:
device_resume();
resume_console();
- Finish:
pm_restore_console();
mutex_unlock(&pm_mutex);
return error;
@@ -274,7 +265,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
error = -EPERM;
break;
}
- error = snapshot_restore(data->platform_suspend);
+ error = snapshot_restore();
break;
case SNAPSHOT_FREE: