diff mbox

[RFC} sdhci.c set_ios -- disable global interrupts and Question on Power Management

Message ID 7953F5A4-7BFA-4E40-8202-C682C0314F49@marvell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Philip Rakity Feb. 13, 2011, 5:39 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 655617c..1a88303 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1161,13 +1161,13 @@  static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 {
 	struct sdhci_host *host;
-	unsigned long flags;
 	unsigned int lastclock;
 	u8 ctrl;
 
 	host = mmc_priv(mmc);
 
-	spin_lock_irqsave(&host->lock, flags);
+	disable_irq(host->irq);
+	spin_lock(&host->lock);
 
 	if (host->flags & SDHCI_DEVICE_DEAD)
 		goto out;
@@ -1180,14 +1180,14 @@  static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	lastclock = host->iosclock;
 	host->iosclock = ios->clock;
 	if (lastclock == 0 && ios->clock != 0) {
-		spin_unlock_irqrestore(&host->lock, flags);
+		spin_unlock(&host->lock);
 		pm_runtime_get_sync(host->mmc->parent);
-		spin_lock_irqsave(&host->lock, flags);
+		spin_lock(&host->lock);
 	} else if (lastclock != 0 && ios->clock == 0) {
-		spin_unlock_irqrestore(&host->lock, flags);
+		spin_unlock(&host->lock);
 		pm_runtime_mark_last_busy(host->mmc->parent);
 		pm_runtime_put_autosuspend(host->mmc->parent);
-		spin_lock_irqsave(&host->lock, flags);
+		spin_lock(&host->lock);
 	}
 	/* no need to configure the rest.. */
 	if (host->iosclock == 0)
@@ -1257,7 +1257,8 @@  static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 
 out:
 	mmiowb();
-	spin_unlock_irqrestore(&host->lock, flags);
+	spin_unlock(&host->lock);
+	enable_irq(host->irq);
 }
 
 static int sdhci_get_ro(struct mmc_host *mmc)