All of lore.kernel.org
 help / color / mirror / Atom feed
From: "kishore kadiyala" <kishore.kadiyala@ti.com>
To: linux-omap@vger.kernel.org
Cc: khilman@deeprootsystems.com, tony@atomide.com, b-cousson@ti.com
Subject: [PATCH 09/10] [PM-WIP-MMC] OMAP MMC : Fix crash with CONFIG_PM_RUNTIME
Date: Sat, 21 Aug 2010 01:41:16 +0530 (IST)	[thread overview]
Message-ID: <16171.10.24.255.18.1282335076.squirrel@dbdmail.itg.ti.com> (raw)

Crash if enabled CONFIG_PM_RUNTIME and power_saving set.

Use get_sync/put_sync properly so that host->nesting_cnt gets
updated properly.

Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

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)
-- 
1.7.0.4



             reply	other threads:[~2010-08-20 20:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 20:11 kishore kadiyala [this message]
2010-08-26 23:23 ` [PATCH 09/10] [PM-WIP-MMC] OMAP MMC : Fix crash with CONFIG_PM_RUNTIME Kevin Hilman
2010-08-27 14:19   ` kishore kadiyala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16171.10.24.255.18.1282335076.squirrel@dbdmail.itg.ti.com \
    --to=kishore.kadiyala@ti.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.