git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git]
/
drivers
/
xen
/
manage.c
diff --git
a/drivers/xen/manage.c
b/drivers/xen/manage.c
index
95143dd
..
a2eee57
100644
(file)
--- a/
drivers/xen/manage.c
+++ b/
drivers/xen/manage.c
@@
-8,6
+8,7
@@
#include <linux/sysrq.h>
#include <linux/stop_machine.h>
#include <linux/freezer.h>
#include <linux/sysrq.h>
#include <linux/stop_machine.h>
#include <linux/freezer.h>
+#include <linux/syscore_ops.h>
#include <xen/xen.h>
#include <xen/xenbus.h>
#include <xen/xen.h>
#include <xen/xenbus.h>
@@
-61,7
+62,7
@@
static void xen_post_suspend(int cancelled)
xen_mm_unpin_all();
}
xen_mm_unpin_all();
}
-#ifdef CONFIG_HIBERNAT
ION
+#ifdef CONFIG_HIBERNAT
E_CALLBACKS
static int xen_suspend(void *data)
{
struct suspend_info *si = data;
static int xen_suspend(void *data)
{
struct suspend_info *si = data;
@@
-70,8
+71,13
@@
static int xen_suspend(void *data)
BUG_ON(!irqs_disabled());
err = sysdev_suspend(PMSG_FREEZE);
BUG_ON(!irqs_disabled());
err = sysdev_suspend(PMSG_FREEZE);
+ if (!err) {
+ err = syscore_suspend();
+ if (err)
+ sysdev_resume();
+ }
if (err) {
if (err) {
- printk(KERN_ERR "xen_suspend: sys
dev_
suspend failed: %d\n",
+ printk(KERN_ERR "xen_suspend: sys
tem core
suspend failed: %d\n",
err);
return err;
}
err);
return err;
}
@@
-95,6
+101,7
@@
static int xen_suspend(void *data)
xen_timer_resume();
}
xen_timer_resume();
}
+ syscore_resume();
sysdev_resume();
return 0;
sysdev_resume();
return 0;
@@
-173,7
+180,7
@@
out:
#endif
shutting_down = SHUTDOWN_INVALID;
}
#endif
shutting_down = SHUTDOWN_INVALID;
}
-#endif /* CONFIG_HIBERNAT
ION
*/
+#endif /* CONFIG_HIBERNAT
E_CALLBACKS
*/
struct shutdown_handler {
const char *command;
struct shutdown_handler {
const char *command;
@@
-202,7
+209,7
@@
static void shutdown_handler(struct xenbus_watch *watch,
{ "poweroff", do_poweroff },
{ "halt", do_poweroff },
{ "reboot", do_reboot },
{ "poweroff", do_poweroff },
{ "halt", do_poweroff },
{ "reboot", do_reboot },
-#ifdef CONFIG_HIBERNAT
ION
+#ifdef CONFIG_HIBERNAT
E_CALLBACKS
{ "suspend", do_suspend },
#endif
{NULL, NULL},
{ "suspend", do_suspend },
#endif
{NULL, NULL},