]> err.no Git - linux-2.6/blobdiff - drivers/xen/manage.c
rtl8187: Improve wireless statistics for RTL8187B
[linux-2.6] / drivers / xen / manage.c
index 675c3dd23962ff45fa6c058250bbb0c834085be1..a5bc91ae6ff69f5d5d4b2e9f49e308acd9126b20 100644 (file)
@@ -31,6 +31,7 @@ enum shutdown_state {
 /* Ignore multiple shutdown requests. */
 static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
 
+#ifdef CONFIG_PM_SLEEP
 static int xen_suspend(void *data)
 {
        int *cancelled = data;
@@ -62,11 +63,12 @@ static int xen_suspend(void *data)
        gnttab_resume();
        xen_mm_unpin_all();
 
-       device_power_up();
+       device_power_up(PMSG_RESUME);
 
        if (!*cancelled) {
                xen_irq_resume();
                xen_console_resume();
+               xen_timer_resume();
        }
 
        return 0;
@@ -106,12 +108,13 @@ static void do_suspend(void)
                goto out;
        }
 
-       if (!cancelled)
+       if (!cancelled) {
+               xen_arch_resume();
                xenbus_resume();
-       else
+       else
                xenbus_suspend_cancel();
 
-       device_resume();
+       device_resume(PMSG_RESUME);
 
        /* Make sure timer events get retriggered on all CPUs */
        clock_was_set();
@@ -121,6 +124,7 @@ out:
 #endif
        shutting_down = SHUTDOWN_INVALID;
 }
+#endif /* CONFIG_PM_SLEEP */
 
 static void shutdown_handler(struct xenbus_watch *watch,
                             const char **vec, unsigned int len)