mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 16:46:23 +08:00
drivers/mmc/host/sdhci-s3c.c: use the correct mutex and card detect function
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. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5193250168
commit
f522886e20
@ -242,7 +242,7 @@ static void sdhci_s3c_notify_change(struct platform_device *dev, int state)
|
|||||||
{
|
{
|
||||||
struct sdhci_host *host = platform_get_drvdata(dev);
|
struct sdhci_host *host = platform_get_drvdata(dev);
|
||||||
if (host) {
|
if (host) {
|
||||||
mutex_lock(&host->lock);
|
spin_lock(&host->lock);
|
||||||
if (state) {
|
if (state) {
|
||||||
dev_dbg(&dev->dev, "card inserted.\n");
|
dev_dbg(&dev->dev, "card inserted.\n");
|
||||||
host->flags &= ~SDHCI_DEVICE_DEAD;
|
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->flags |= SDHCI_DEVICE_DEAD;
|
||||||
host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
|
host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
|
||||||
}
|
}
|
||||||
sdhci_card_detect(host);
|
tasklet_schedule(&host->card_tasklet);
|
||||||
mutex_unlock(&host->lock);
|
spin_unlock(&host->lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user