mtd: elm: compile suspend/resume only with PM_SLEEP
authorWolfram Sang <wsa@sang-engineering.com>
Thu, 17 Apr 2014 07:39:07 +0000 (09:39 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 12 May 2014 20:16:25 +0000 (13:16 -0700)
Fixes:
drivers/mtd/devices/elm.c:480:12: warning: 'elm_suspend' defined but not used [-Wunused-function]
drivers/mtd/devices/elm.c:488:12: warning: 'elm_resume' defined but not used [-Wunused-function]

Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
Acked-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/devices/elm.c

index 1fd4a0f779674475513837c4ed18a7e30f3a259d..0a037b15c11b5551d3024976e9996232a1a9830d 100644 (file)
@@ -418,6 +418,7 @@ static int elm_remove(struct platform_device *pdev)
        return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 /**
  * elm_context_save
  * saves ELM configurations to preserve them across Hardware powered-down
@@ -509,6 +510,7 @@ static int elm_resume(struct device *dev)
        elm_context_restore(info);
        return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume);