@@ -2222,6 +2222,9 @@ static int omap_hsmmc_suspend(struct device *dev)
if (host && host->suspended)
return 0;
+ if (pm_is_runtime_suspended(host->dev))
+ return 0;
+
if (host) {
host->suspended = 1;
if (host->pdata->suspend) {
@@ -2260,12 +2263,6 @@ static int omap_hsmmc_suspend(struct device *dev)
}
mmc_host_disable(host->mmc);
}
-
- /*
- * HACK: "extra" put to compensate for DPM core keeping
- * runtime PM disabled. -- khilman
- */
- pm_runtime_put_sync(host->dev);
}
return ret;
}
@@ -2280,13 +2277,10 @@ static int omap_hsmmc_resume(struct device *dev)
if (host && !host->suspended)
return 0;
- if (host) {
- /*
- * HACK: "extra" get to compensate for DPM core keeping
- * runtime PM disabled. -- khilman
- */
- pm_runtime_get_sync(host->dev);
+ if (pm_is_runtime_suspended(host->dev))
+ return 0;
+ if (host) {
if (mmc_host_enable(host->mmc) != 0) {
pm_runtime_suspend(host->dev);
goto clk_en_err;