aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/mmc.c
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2010-10-02 13:54:06 +0200
committerChris Ball <cjb@laptop.org>2010-10-23 21:11:17 +0800
commit12ae637f081a7a05144af65802a7b492b9162660 (patch)
tree1b54043d766aaf33466f5efad08d53d16a024f85 /drivers/mmc/core/mmc.c
parent9b966aae6419f7d75a87114c4d82bfb8f8699132 (diff)
mmc: propagate power save/restore ops return value
Allow power save/restore and their relevant mmc_bus_ops handlers exit with a return value. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Tested-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/mmc.c')
-rw-r--r--drivers/mmc/core/mmc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index df2a817303b..995261f7fd7 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -657,12 +657,16 @@ static int mmc_resume(struct mmc_host *host)
return err;
}
-static void mmc_power_restore(struct mmc_host *host)
+static int mmc_power_restore(struct mmc_host *host)
{
+ int ret;
+
host->card->state &= ~MMC_STATE_HIGHSPEED;
mmc_claim_host(host);
- mmc_init_card(host, host->ocr, host->card);
+ ret = mmc_init_card(host, host->ocr, host->card);
mmc_release_host(host);
+
+ return ret;
}
static int mmc_sleep(struct mmc_host *host)