aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/omap_hsmmc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 81ab8e2..26bd9e6 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2329,8 +2329,6 @@ static int omap_hsmmc_suspend(struct device *dev)
return 0;
if (host) {
- pm_runtime_get_sync(host->dev);
-
host->suspended = 1;
if (host->pdata->suspend) {
ret = host->pdata->suspend(&pdev->dev,
@@ -2340,7 +2338,6 @@ static int omap_hsmmc_suspend(struct device *dev)
"Unable to handle MMC board"
" level suspend\n");
host->suspended = 0;
- pm_runtime_put_sync(host->dev);
return ret;
}
}
@@ -2349,9 +2346,11 @@ static int omap_hsmmc_suspend(struct device *dev)
host->mmc->pm_flags |= MMC_PM_KEEP_POWER;
ret = mmc_suspend_host(host->mmc);
if (ret == 0) {
+ mmc_host_enable(host->mmc);
omap_hsmmc_disable_irq(host);
OMAP_HSMMC_WRITE(host->base, HCTL,
OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP);
+ mmc_host_disable(host->mmc);
if (host->got_dbclk)
clk_disable(host->dbclk);
@@ -2366,7 +2365,6 @@ static int omap_hsmmc_suspend(struct device *dev)
}
}
- pm_runtime_put_sync(host->dev);
}
return ret;
}
@@ -2382,7 +2380,9 @@ static int omap_hsmmc_resume(struct device *dev)
return 0;
if (host) {
- pm_runtime_get_sync(host->dev);
+ if (mmc_host_enable(host->mmc) != 0) {
+ goto clk_en_err;
+ }
if (host->got_dbclk)
clk_enable(host->dbclk);
@@ -2403,7 +2403,7 @@ static int omap_hsmmc_resume(struct device *dev)
if (ret == 0)
host->suspended = 0;
- pm_runtime_put_sync(host->dev);
+ mmc_host_lazy_disable(host->mmc);
}
return ret;