瀏覽代碼

CONFIG_PM_SLEEP fix: xen: fix compilation when CONFIG_PM_SLEEP is disabled

Xen save/restore depends on CONFIG_PM_SLEEP being set for device_power_up/down.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge 17 年之前
父節點
當前提交
c78277288e
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/xen/manage.c

+ 2 - 0
drivers/xen/manage.c

@@ -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;
@@ -121,6 +122,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)