Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61539
b: refs/heads/master
c: 127067a
h: refs/heads/master
i:
  61537: 9781b78
  61535: 8fe5d1e
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed Jul 19, 2007
1 parent df4b44c commit 64a81ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0349828d6d6f95c445674c2953ee9db75c11f8f
refs/heads/master: 127067a9c994dff16b280f409cc7b18a54a63719
17 changes: 4 additions & 13 deletions trunk/kernel/power/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 64a81ed

Please sign in to comment.