From patchwork Fri Aug 20 20:11:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kishore kadiyala X-Patchwork-Id: 120761 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7KKAMYK027692 for ; Fri, 20 Aug 2010 20:11:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176Ab0HTULU (ORCPT ); Fri, 20 Aug 2010 16:11:20 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:49311 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753139Ab0HTULT (ORCPT ); Fri, 20 Aug 2010 16:11:19 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o7KKBIis024069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Aug 2010 15:11:18 -0500 Received: from dbdmail.itg.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o7KKBDQc004638; Fri, 20 Aug 2010 15:11:15 -0500 (CDT) Received: from 10.24.255.18 (SquirrelMail authenticated user x0099945); by dbdmail.itg.ti.com with HTTP; Sat, 21 Aug 2010 01:41:16 +0530 (IST) Message-ID: <16171.10.24.255.18.1282335076.squirrel@dbdmail.itg.ti.com> Date: Sat, 21 Aug 2010 01:41:16 +0530 (IST) Subject: [PATCH 09/10] [PM-WIP-MMC] OMAP MMC : Fix crash with CONFIG_PM_RUNTIME From: "kishore kadiyala" To: linux-omap@vger.kernel.org Cc: khilman@deeprootsystems.com, tony@atomide.com, b-cousson@ti.com User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 20 Aug 2010 20:11:20 +0000 (UTC) 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)