mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
mmc: sdhci-of-arasan: fix using sleep function whthin spinlock
Let's use unlock/lock around phy APIs as them will call mutex which is sleepable casuing failure of kernel debug check. Change-Id: Ic7670bfc9ed763cc9bdec53f85f553bc0be1416c Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
committed by
Gerrit Code Review
parent
c1b1c53c7e
commit
a7a3b1a72d
@@ -83,13 +83,19 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||
if (clock > MMC_HIGH_52_MAX_DTR && (!IS_ERR(sdhci_arasan->phy)))
|
||||
ctrl_phy = true;
|
||||
|
||||
if (ctrl_phy)
|
||||
if (ctrl_phy) {
|
||||
spin_unlock_irq(&host->lock);
|
||||
phy_power_off(sdhci_arasan->phy);
|
||||
spin_lock_irq(&host->lock);
|
||||
}
|
||||
|
||||
sdhci_set_clock(host, clock);
|
||||
|
||||
if (ctrl_phy)
|
||||
if (ctrl_phy) {
|
||||
spin_unlock_irq(&host->lock);
|
||||
phy_power_on(sdhci_arasan->phy);
|
||||
spin_lock_irq(&host->lock);
|
||||
}
|
||||
}
|
||||
|
||||
static struct sdhci_ops sdhci_arasan_ops = {
|
||||
|
||||
Reference in New Issue
Block a user