Commit 0dd1bfeb authored by Chuanxiao Dong's avatar Chuanxiao Dong Committed by Chris Ball

mmc: core: check PM_SLEEP for mmc_bus_suspend/resume callbacks

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: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarChuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 48b332f9
...@@ -122,6 +122,7 @@ static int mmc_bus_remove(struct device *dev) ...@@ -122,6 +122,7 @@ static int mmc_bus_remove(struct device *dev)
return 0; return 0;
} }
#ifdef CONFIG_PM_SLEEP
static int mmc_bus_suspend(struct device *dev) static int mmc_bus_suspend(struct device *dev)
{ {
struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_driver *drv = to_mmc_driver(dev->driver);
...@@ -143,6 +144,7 @@ static int mmc_bus_resume(struct device *dev) ...@@ -143,6 +144,7 @@ static int mmc_bus_resume(struct device *dev)
ret = drv->resume(card); ret = drv->resume(card);
return ret; return ret;
} }
#endif
#ifdef CONFIG_PM_RUNTIME #ifdef CONFIG_PM_RUNTIME
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment