aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-06-10 11:03:44 -0400
committerChris Ball <cjb@laptop.org>2013-06-27 12:39:20 -0400
commit486fdbbc1483504cde0314e33e47bc32e9d38186 (patch)
treeb1fd64aa3de40099693fdade6cc085f06337115d /drivers/mmc/core
parent03d071fc8de4ad9b6e7374720ae81b7e928f6075 (diff)
mmc: core: Add shutdown callback for (e)MMC bus_ops
The shutdown sequence of an (e)MMC is very similar to a suspend. We re-use the suspend function and tell it we are not in suspend context. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/mmc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index ab34a39486ae..f670c285613d 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1509,6 +1509,14 @@ static int mmc_suspend(struct mmc_host *host)
1509} 1509}
1510 1510
1511/* 1511/*
1512 * Shutdown callback
1513 */
1514static int mmc_shutdown(struct mmc_host *host)
1515{
1516 return _mmc_suspend(host, false);
1517}
1518
1519/*
1512 * Resume callback from host. 1520 * Resume callback from host.
1513 * 1521 *
1514 * This function tries to determine if the same card is still present 1522 * This function tries to determine if the same card is still present
@@ -1597,6 +1605,7 @@ static const struct mmc_bus_ops mmc_ops = {
1597 .resume = NULL, 1605 .resume = NULL,
1598 .power_restore = mmc_power_restore, 1606 .power_restore = mmc_power_restore,
1599 .alive = mmc_alive, 1607 .alive = mmc_alive,
1608 .shutdown = mmc_shutdown,
1600}; 1609};
1601 1610
1602static const struct mmc_bus_ops mmc_ops_unsafe = { 1611static const struct mmc_bus_ops mmc_ops_unsafe = {
@@ -1608,6 +1617,7 @@ static const struct mmc_bus_ops mmc_ops_unsafe = {
1608 .runtime_resume = mmc_runtime_resume, 1617 .runtime_resume = mmc_runtime_resume,
1609 .power_restore = mmc_power_restore, 1618 .power_restore = mmc_power_restore,
1610 .alive = mmc_alive, 1619 .alive = mmc_alive,
1620 .shutdown = mmc_shutdown,
1611}; 1621};
1612 1622
1613static void mmc_attach_bus_ops(struct mmc_host *host) 1623static void mmc_attach_bus_ops(struct mmc_host *host)