Skip to contentSkip to conversation

Samsung: MMC: Use the correct mutex and card detect function

PATCH New Kyungmin Park 1 participant 1 message Aug 17, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Samsung: MMC: Use the correct mutex and card detect function

From: Kyungmin Park <[email protected]>

There's some merge problem between sdhic core and sdhci-s3c host. After mutex is changed to spinlock. it needs to use use spin lock functions and use the correct card detection function.

---

drivers/mmc/host/sdhci-s3c.c +3 -3
index 0a7f261..71ad416 100644
@@ -242,7 +242,7 @@ static void sdhci_s3c_notify_change(struct platform_device *dev, int state)
 {
 	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(struct platform_device *dev, int state)
 			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);
 	}
 }