Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / kernel / power / disk.c
index 81d4d98..7c7b9b6 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/fs.h>
 #include <linux/mount.h>
 #include <linux/pm.h>
+#include <linux/cpu.h>
 
 #include "power.h"
 
@@ -72,7 +73,10 @@ static int prepare_processes(void)
        int error;
 
        pm_prepare_console();
-       disable_nonboot_cpus();
+
+       error = disable_nonboot_cpus();
+       if (error)
+               goto enable_cpus;
 
        if (freeze_processes()) {
                error = -EBUSY;
@@ -84,6 +88,7 @@ static int prepare_processes(void)
                return 0;
 thaw:
        thaw_processes();
+enable_cpus:
        enable_nonboot_cpus();
        pm_restore_console();
        return error;
@@ -231,7 +236,7 @@ static int software_resume(void)
 late_initcall(software_resume);
 
 
-static char * pm_disk_modes[] = {
+static const char * const pm_disk_modes[] = {
        [PM_DISK_FIRMWARE]      = "firmware",
        [PM_DISK_PLATFORM]      = "platform",
        [PM_DISK_SHUTDOWN]      = "shutdown",