From 5dce427f179ea9d63c2ddcce57363807ad9e7a53 Mon Sep 17 00:00:00 2001 From: lintao Date: Wed, 10 Sep 2014 15:21:15 +0800 Subject: [PATCH] mmc: fix spinlock bf in irq env --- drivers/mmc/host/rk_sdmmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index 586b91479e3a..4f3c0d3b9ae4 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -1694,10 +1694,11 @@ static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb) { struct dw_mci_slot *slot = mmc_priv(mmc); struct dw_mci *host = slot->host; + unsigned long flags; u32 int_mask; u32 sdio_int; - spin_lock_bh(&host->lock); + spin_lock_irqsave(&host->lock, flags); /* Enable/disable Slot Specific SDIO interrupt */ int_mask = mci_readl(host, INTMASK); @@ -1723,7 +1724,7 @@ static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb) (int_mask & ~sdio_int)); } - spin_unlock_bh(&host->lock); + spin_unlock_irqrestore(&host->lock, flags); } #ifdef CONFIG_MMC_DW_ROCKCHIP_SWITCH_VOLTAGE -- 2.34.1