mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
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>
This commit is contained in:
parent
936577c61d
commit
770824bdc4
8 changed files with 38 additions and 7 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue