diff mbox

+ drivers-mmc-host-sdhci-s3cc-use-the-correct-mutex-and-card-detect-function.patch added to -mm tree

Message ID 201008190242.o7J2ga0c025961@imap1.linux-foundation.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Andrew Morton Aug. 19, 2010, 2:45 a.m. UTC
None
diff mbox

Patch

diff -puN drivers/mmc/host/sdhci-s3c.c~drivers-mmc-host-sdhci-s3cc-use-the-correct-mutex-and-card-detect-function drivers/mmc/host/sdhci-s3c.c
--- a/drivers/mmc/host/sdhci-s3c.c~drivers-mmc-host-sdhci-s3cc-use-the-correct-mutex-and-card-detect-function
+++ a/drivers/mmc/host/sdhci-s3c.c
@@ -242,7 +242,7 @@  static void sdhci_s3c_notify_change(stru
 {
 	struct sdhci_host *host = platform_get_drvdata(dev);
 	if (host) {
-		mutex_lock(&host->lock);
+		spin_lock(&host->lock);
 		if (state) {
 			dev_dbg(&dev->dev, "card inserted.\n");
 			host->flags &= ~SDHCI_DEVICE_DEAD;
@@ -252,8 +252,8 @@  static void sdhci_s3c_notify_change(stru
 			host->flags |= SDHCI_DEVICE_DEAD;
 			host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
 		}
-		sdhci_card_detect(host);
-		mutex_unlock(&host->lock);
+		tasklet_schedule(&host->card_tasklet);
+		spin_unlock(&host->lock);
 	}
 }