aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@stericsson.com>2011-02-14 16:15:35 +0100
committerJonas ABERG <jonas.aberg@stericsson.com>2011-02-14 16:31:23 +0100
commite7ac283463250e1c38239aa7a6138edf7284c76d (patch)
tree3e5224a8d61cc89f4e9db2458b81e79e64cd2930
parentea98f3bc5276005f92dd2f8ed6531644cd283382 (diff)
mmc: sdio: Fix bug when re-initialize an SDIO cardu8500-android-2.3_v0.13
An early return prevented the re-initalization of an sdio card to go all the way. This happens after the host is suspended/disabled and is about to be resumed/enabled again. Change-Id: Id93dd8f1ab7e9c0b80c135f23e0f3123cd4f9f98 Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/15225 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r--drivers/mmc/core/sdio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index a24f3981f58..37199337efb 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -364,7 +364,6 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
goto err;
}
card = oldcard;
- return 0;
}
/*
@@ -537,13 +536,14 @@ static int mmc_sdio_resume(struct mmc_host *host)
static void mmc_sdio_power_restore(struct mmc_host *host)
{
+ int err;
BUG_ON(!host);
BUG_ON(!host->card);
mmc_claim_host(host);
- mmc_sdio_init_card(host, host->ocr, host->card,
- (host->pm_flags & MMC_PM_KEEP_POWER));
- if (host->sdio_irqs)
+ err = mmc_sdio_init_card(host, host->ocr, host->card,
+ (host->pm_flags & MMC_PM_KEEP_POWER));
+ if (!err && host->sdio_irqs)
mmc_signal_sdio_irq(host);
mmc_release_host(host);
}