summaryrefslogtreecommitdiff
path: root/drivers/xen/manage.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2011-02-25 12:27:14 -0800
committerTony Lindgren <tony@atomide.com>2011-02-25 12:27:14 -0800
commit02fa9f0451ac639a687bfc145eefe58703ff220e (patch)
treefe984acc78f22f6eb8fb98efaba8b1ac2f3ad8d9 /drivers/xen/manage.c
parentcbc9438075ca9dee3f39a2e7310f81c304b40359 (diff)
parent51c404b2c514930e98e81e0b9294f19892a4f871 (diff)
Merge branch 'patches_for_2.6.38rc' of git://git.pwsan.com/linux-2.6 into devel-fixes
Diffstat (limited to 'drivers/xen/manage.c')
-rw-r--r--drivers/xen/manage.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index db8c4c4ac88..24177272bcb 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -37,11 +37,19 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
#ifdef CONFIG_PM_SLEEP
static int xen_hvm_suspend(void *data)
{
+ int err;
struct sched_shutdown r = { .reason = SHUTDOWN_suspend };
int *cancelled = data;
BUG_ON(!irqs_disabled());
+ err = sysdev_suspend(PMSG_SUSPEND);
+ if (err) {
+ printk(KERN_ERR "xen_hvm_suspend: sysdev_suspend failed: %d\n",
+ err);
+ return err;
+ }
+
*cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
xen_hvm_post_suspend(*cancelled);
@@ -53,6 +61,8 @@ static int xen_hvm_suspend(void *data)
xen_timer_resume();
}
+ sysdev_resume();
+
return 0;
}