From: Pavel Machek <[email protected]>
Fix error printing in swsusp.c: add loglevels and add very usefull error
information. Trivial cleanup for disk.c.
Signed-off-by: Pavel Machek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
kernel/power/disk.c | 8 ++------
kernel/power/swsusp.c | 3 ++-
2 files changed, 4 insertions(+), 7 deletions(-)
diff -puN kernel/power/disk.c~swsusp-fix-printks-and-cleanups kernel/power/disk.c
--- devel/kernel/power/disk.c~swsusp-fix-printks-and-cleanups 2005-07-12 02:14:51.000000000 -0700
+++ devel-akpm/kernel/power/disk.c 2005-07-12 02:14:51.000000000 -0700
@@ -52,21 +52,17 @@ static void power_down(suspend_disk_meth
unsigned long flags;
int error = 0;
+ device_shutdown();
+ local_irq_save(flags);
switch(mode) {
case PM_DISK_PLATFORM:
- device_shutdown();
- local_irq_save(flags);
error = pm_ops->enter(PM_SUSPEND_DISK);
break;
case PM_DISK_SHUTDOWN:
printk("Powering off system\n");
- device_shutdown();
- local_irq_save(flags);
machine_power_off();
break;
case PM_DISK_REBOOT:
- device_shutdown();
- local_irq_save(flags);
machine_restart(NULL);
break;
}
diff -puN kernel/power/swsusp.c~swsusp-fix-printks-and-cleanups kernel/power/swsusp.c
--- devel/kernel/power/swsusp.c~swsusp-fix-printks-and-cleanups 2005-07-12 02:14:51.000000000 -0700
+++ devel-akpm/kernel/power/swsusp.c 2005-07-12 02:14:51.000000000 -0700
@@ -886,6 +886,7 @@ 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();
return error;
}
@@ -899,7 +900,7 @@ int swsusp_suspend(void)
save_processor_state();
if ((error = swsusp_arch_suspend()))
- printk("Error %d suspending\n", error);
+ printk(KERN_ERR "Error %d suspending\n", error);
/* Restore control flow magically appears here */
restore_processor_state();
BUG_ON (nr_copy_pages_check != nr_copy_pages);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|