Skip to content

Commit

Permalink
mmc: core: check PM_SLEEP for mmc_bus_suspend/resume callbacks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chuanxiao Dong authored and Chris Ball committed Apr 23, 2012
1 parent 48b332f commit 0dd1bfe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mmc/core/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -143,6 +144,7 @@ static int mmc_bus_resume(struct device *dev)
ret = drv->resume(card);
return ret;
}
#endif

#ifdef CONFIG_PM_RUNTIME

Expand Down

0 comments on commit 0dd1bfe

Please sign in to comment.