Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4253
b: refs/heads/master
c: 47b724f
h: refs/heads/master
i:
  4251: 05aa5f6
v: v3
  • Loading branch information
Pavel Machek authored and Linus Torvalds committed Jul 8, 2005
1 parent 1d5c899 commit 9adeaf9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 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: 3efa147ad7608196639882ba4075b376f306fe16
refs/heads/master: 47b724f3fe372a3d9acf0bb560fb5c93c9867880
23 changes: 11 additions & 12 deletions trunk/kernel/power/swsusp.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,13 +869,6 @@ extern asmlinkage int swsusp_arch_resume(void);

asmlinkage int swsusp_save(void)
{
int error = 0;

if ((error = swsusp_swap_check())) {
printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try "
"swapon -a!\n");
return error;
}
return suspend_prepare_image();
}

Expand All @@ -892,14 +885,20 @@ int swsusp_suspend(void)
* at resume time, and evil weirdness ensues.
*/
if ((error = device_power_down(PMSG_FREEZE))) {
printk(KERN_ERR "Some devices failed to power down, aborting suspend\n");
local_irq_enable();
swsusp_free();
return error;
}

if ((error = swsusp_swap_check())) {
printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try "
"swapon -a!\n");
local_irq_enable();
return error;
}

save_processor_state();
if ((error = swsusp_arch_suspend()))
swsusp_free();
printk("Error %d suspending\n", error);
/* Restore control flow magically appears here */
restore_processor_state();
BUG_ON (nr_copy_pages_check != nr_copy_pages);
Expand Down Expand Up @@ -1166,9 +1165,9 @@ static int bio_write_page(pgoff_t page_off, void * page)
static const char * sanity_check(void)
{
dump_info();
if(swsusp_info.version_code != LINUX_VERSION_CODE)
if (swsusp_info.version_code != LINUX_VERSION_CODE)
return "kernel version";
if(swsusp_info.num_physpages != num_physpages)
if (swsusp_info.num_physpages != num_physpages)
return "memory size";
if (strcmp(swsusp_info.uts.sysname,system_utsname.sysname))
return "system type";
Expand Down

0 comments on commit 9adeaf9

Please sign in to comment.