diff mbox

[09/10,PM-WIP-MMC] OMAP MMC : Fix crash with CONFIG_PM_RUNTIME

Message ID 16171.10.24.255.18.1282335076.squirrel@dbdmail.itg.ti.com (mailing list archive)
State Changes Requested
Delegated to: Kevin Hilman
Headers show

Commit Message

kishore kadiyala Aug. 20, 2010, 8:11 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index c113bfd..90a69c3 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2036,7 +2036,8 @@  static int __init omap_hsmmc_probe(struct platform_device *pdev)
 	host->dpm_state = DISABLED;

 	pm_runtime_enable(host->dev);
-	pm_runtime_get_sync(host->dev);
+	if (mmc_host_enable(host->mmc) != 0)
+		goto err1;

 	if (cpu_is_omap2430()) {
 		host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
@@ -2139,8 +2140,6 @@  static int __init omap_hsmmc_probe(struct platform_device *pdev)

 	mmc_add_host(mmc);

-	pm_runtime_put(host->dev);
-
 	if (mmc_slot(host).name != NULL) {
 		ret = device_create_file(&mmc->class_dev, &dev_attr_slot_name);
 		if (ret < 0)