diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-03-25 17:59:52 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-03-25 17:59:52 +1100 |
commit | eef2b49abcb93ab609e602e0708e854876912a76 (patch) | |
tree | 636c202750d104b975cb882c8d02d5ef0d35261a /arch | |
parent | 4baafd1d5a475bced4399ca0d918e85c5b8dd961 (diff) | |
parent | 5f4ff4f5f5a60a066c153cc9a4c1ad0188a9b2ef (diff) |
Merge commit 'suspend/linux-next'
Conflicts:
drivers/xen/manage.c
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/apm_32.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index c1941be9fb17..49e0939bac42 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c @@ -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) |