]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/kexec.c
PM: Rework handling of interrupts during suspend-resume
[linux-2.6-omap-h63xx.git] / kernel / kexec.c
index c7fd6692939d6bd03c13019996874677f296d83c..dade9af6bf21fafac9f94528ba659e7925593850 100644 (file)
@@ -1454,7 +1454,6 @@ int kernel_kexec(void)
                if (error)
                        goto Resume_devices;
                device_pm_lock();
-               local_irq_disable();
                /* At this point, device_suspend() has been called,
                 * but *not* device_power_down(). We *must*
                 * device_power_down() now.  Otherwise, drivers for
@@ -1464,8 +1463,9 @@ int kernel_kexec(void)
                 */
                error = device_power_down(PMSG_FREEZE);
                if (error)
-                       goto Enable_irqs;
+                       goto Unlock_pm;
 
+               local_irq_disable();
                /* Suspend system devices */
                error = sysdev_suspend(PMSG_FREEZE);
                if (error)
@@ -1484,9 +1484,9 @@ int kernel_kexec(void)
        if (kexec_image->preserve_context) {
                sysdev_resume();
  Power_up_devices:
-               device_power_up(PMSG_RESTORE);
- Enable_irqs:
                local_irq_enable();
+               device_power_up(PMSG_RESTORE);
+ Unlock_pm:
                device_pm_unlock();
                enable_nonboot_cpus();
  Resume_devices: