diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-08-16 13:42:41 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2012-08-16 13:42:41 -0700 |
commit | 2dfc945f47277bd4edbf110b18ad36f0b050a5a8 (patch) | |
tree | 318ab80fef22b3f3ae6bf3711795a0a13b4d6c3f /drivers/mmc/host | |
parent | 1062dd1ee89a7b066190f82db9ac769c34969d73 (diff) | |
parent | 392f3a36736547fb8a53c871217be1025110b013 (diff) | |
download | kernel_samsung_tuna-2dfc945f47277bd4edbf110b18ad36f0b050a5a8.zip kernel_samsung_tuna-2dfc945f47277bd4edbf110b18ad36f0b050a5a8.tar.gz kernel_samsung_tuna-2dfc945f47277bd4edbf110b18ad36f0b050a5a8.tar.bz2 |
Merge branch 'linux-omap-3.0' into android-omap-3.0
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 26bd9e6..c507190 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2329,6 +2329,8 @@ 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, @@ -2338,6 +2340,7 @@ 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; } } @@ -2346,11 +2349,9 @@ 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); @@ -2365,6 +2366,7 @@ static int omap_hsmmc_suspend(struct device *dev) } } + pm_runtime_put_sync(host->dev); } return ret; } @@ -2380,9 +2382,7 @@ static int omap_hsmmc_resume(struct device *dev) return 0; if (host) { - if (mmc_host_enable(host->mmc) != 0) { - goto clk_en_err; - } + pm_runtime_get_sync(host->dev); if (host->got_dbclk) clk_enable(host->dbclk); @@ -2403,15 +2403,10 @@ static int omap_hsmmc_resume(struct device *dev) if (ret == 0) host->suspended = 0; - mmc_host_lazy_disable(host->mmc); + pm_runtime_put_sync(host->dev); } return ret; - -clk_en_err: - dev_dbg(mmc_dev(host->mmc), - "Failed to enable MMC clocks during resume\n"); - return ret; } #else |