Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 631f1b36 authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan Committed by Matt Wagantall
Browse files

mmc: sdhci: Fix spinlock handling in sdhci_do_set_ios()



sdhci_update_clock() has been removed and host ops set_clock() is called
directly in various places. Release the host spinlock before calling
host ops set_clock().

Change-Id: Ia12917286a7d791e6a6ad826c0b7edd71c8694ae
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent ef8c76eb
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1902,8 +1902,11 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
			sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);

			/* Re-enable SD Clock */
			if (ios->clock)
			if (ios->clock) {
				spin_unlock_irqrestore(&host->lock, flags);
				host->ops->set_clock(host, host->clock);
				spin_lock_irqsave(&host->lock, flags);
			}
		}

		/* Reset SD Clock Enable */
@@ -1929,8 +1932,11 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
		}

		/* Re-enable SD Clock */
		if (ios->clock)
		if (ios->clock) {
			spin_unlock_irqrestore(&host->lock, flags);
			host->ops->set_clock(host, host->clock);
			spin_lock_irqsave(&host->lock, flags);
		}
	} else
		sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);