From 0dd1bfeb6cc89467261cc62ca81e0ac5da78ec0a Mon Sep 17 00:00:00 2001 From: Chuanxiao Dong Date: Mon, 23 Apr 2012 15:18:02 +0800 Subject: [PATCH] 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: Andrew Lunn Signed-off-by: Chuanxiao Dong Signed-off-by: Chris Ball --- drivers/mmc/core/bus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index c60cee92a2b2..9b68933f27e7 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -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 -- 2.39.5