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 /drivers/xen/manage.c | |
parent | 936577c61d0c10b8929608a92c98d839b22053bc (diff) | |
download | blackbird-op-linux-770824bdc421ff58a64db608294323571c949f4c.tar.gz blackbird-op-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 'drivers/xen/manage.c')
-rw-r--r-- | drivers/xen/manage.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 9b91617b9582..56892a142ee2 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c @@ -45,6 +45,13 @@ static int xen_suspend(void *data) err); return err; } + err = sysdev_suspend(PMSG_SUSPEND); + if (err) { + printk(KERN_ERR "xen_suspend: sysdev_suspend failed: %d\n", + err); + device_power_up(PMSG_RESUME); + return err; + } xen_mm_pin_all(); gnttab_suspend(); @@ -61,6 +68,7 @@ static int xen_suspend(void *data) gnttab_resume(); xen_mm_unpin_all(); + sysdev_resume(); device_power_up(PMSG_RESUME); if (!*cancelled) { |