mmc: core: check PM_SLEEP for mmc_bus_suspend/resume callbacks
authorChuanxiao Dong <chuanxiao.dong@intel.com>
Mon, 23 Apr 2012 07:18:02 +0000 (15:18 +0800)
committerChris Ball <cjb@laptop.org>
Mon, 23 Apr 2012 12:11:28 +0000 (08:11 -0400)
If PM_SLEEP is not enabled, mmc.c will give warnning since mmc_bus_suspend/
mmc_bus_resume functions are defined but not used. This patch can fix this
warnning.

Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/bus.c

index c60cee92a2b2fe9bfd4a9b863dbc95d0e76e2eae..9b68933f27e783260242d5568b860cabaf8c6f0e 100644 (file)
@@ -122,6 +122,7 @@ static int mmc_bus_remove(struct device *dev)
        return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int mmc_bus_suspend(struct device *dev)
 {
        struct mmc_driver *drv = to_mmc_driver(dev->driver);
@@ -143,6 +144,7 @@ static int mmc_bus_resume(struct device *dev)
                ret = drv->resume(card);
        return ret;
 }
+#endif
 
 #ifdef CONFIG_PM_RUNTIME