]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/apm_32.c
Merge branch 'cpumask-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / apm_32.c
index c1941be9fb1777e57cb09190023422e8d17af2e8..49e0939bac4211ba35f32240af5e92ed905ec578 100644 (file)
@@ -1234,8 +1234,10 @@ static int suspend(int vetoable)
        struct apm_user *as;
 
        device_suspend(PMSG_SUSPEND);
-       local_irq_disable();
+
        device_power_down(PMSG_SUSPEND);
+
+       local_irq_disable();
        sysdev_suspend(PMSG_SUSPEND);
 
        local_irq_enable();
@@ -1253,9 +1255,12 @@ static int suspend(int vetoable)
        if (err != APM_SUCCESS)
                apm_error("suspend", err);
        err = (err == APM_SUCCESS) ? 0 : -EIO;
+
        sysdev_resume();
-       device_power_up(PMSG_RESUME);
        local_irq_enable();
+
+       device_power_up(PMSG_RESUME);
+
        device_resume(PMSG_RESUME);
        queue_event(APM_NORMAL_RESUME, NULL);
        spin_lock(&user_list_lock);
@@ -1272,8 +1277,9 @@ static void standby(void)
 {
        int err;
 
-       local_irq_disable();
        device_power_down(PMSG_SUSPEND);
+
+       local_irq_disable();
        sysdev_suspend(PMSG_SUSPEND);
        local_irq_enable();
 
@@ -1283,8 +1289,9 @@ static void standby(void)
 
        local_irq_disable();
        sysdev_resume();
-       device_power_up(PMSG_RESUME);
        local_irq_enable();
+
+       device_power_up(PMSG_RESUME);
 }
 
 static apm_event_t get_event(void)