diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-02-22 18:38:50 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-22 10:33:44 -0800 |
commit | 770824bdc421ff58a64db608294323571c949f4c (patch) | |
tree | 2fbeef604fe982bf322249a53a95dd2ff851d5f4 /kernel/kexec.c | |
parent | 936577c61d0c10b8929608a92c98d839b22053bc (diff) | |
download | linux-770824bdc421ff58a64db608294323571c949f4c.tar.gz linux-770824bdc421ff58a64db608294323571c949f4c.tar.bz2 linux-770824bdc421ff58a64db608294323571c949f4c.zip |
PM: Split up sysdev_[suspend|resume] from device_power_[down|up]
Move the sysdev_suspend/resume from the callee to the callers, with
no real change in semantics, so that we can rework the disabling of
interrupts during suspend/hibernation.
This is based on an earlier patch from Linus.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r-- | kernel/kexec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index 8a6d7b08864e..483899578259 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -1465,6 +1465,11 @@ int kernel_kexec(void) error = device_power_down(PMSG_FREEZE); if (error) goto Enable_irqs; + + /* Suspend system devices */ + error = sysdev_suspend(PMSG_FREEZE); + if (error) + goto Power_up_devices; } else #endif { @@ -1477,6 +1482,8 @@ int kernel_kexec(void) #ifdef CONFIG_KEXEC_JUMP if (kexec_image->preserve_context) { + sysdev_resume(); + Power_up_devices: device_power_up(PMSG_RESTORE); Enable_irqs: local_irq_enable(); |