diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2013-06-10 17:03:41 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-06-27 12:39:18 -0400 |
commit | 6b086bde71243e2596f9d8e3c060119b84110d33 (patch) | |
tree | a8ad7455f7d1fbc88efab37baa73bf7a0847a9b5 /drivers/mmc/core/bus.c | |
parent | 7628774851751e55362ec7d9d57c9334e656a655 (diff) | |
download | talos-obmc-linux-6b086bde71243e2596f9d8e3c060119b84110d33.tar.gz talos-obmc-linux-6b086bde71243e2596f9d8e3c060119b84110d33.zip |
mmc: core: Extend shutdown sequence to handle bus operations
By adding an optional .shutdown callback to the bus_ops struct we
provide the possibility to let each bus type handle it's shutdown
requirements.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/bus.c')
-rw-r--r-- | drivers/mmc/core/bus.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 219bf4b1d97e..4c0decfffb53 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -126,8 +126,17 @@ static void mmc_bus_shutdown(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); + struct mmc_host *host = card->host; + int ret; drv->shutdown(card); + + if (host->bus_ops->shutdown) { + ret = host->bus_ops->shutdown(host); + if (ret) + pr_warn("%s: error %d during shutdown\n", + mmc_hostname(host), ret); + } } #ifdef CONFIG_PM_SLEEP |