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

Commit 4ae31405 authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan Committed by Matt Wagantall
Browse files

mmc: sdhci: Fix mmc_power_off sequence



During mmc_power_off in sdhci_do_set_ios clock to the card needs
to be turned off as a last step after the power is turned off.
The existing check turns off the clock first and thereby never
turns off the power.

Change-Id: I961b090c814d9182aff11da7a3b090d9a84fc299
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent 90e708fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1800,7 +1800,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
		sdhci_enable_preset_value(host, false);

	spin_lock_irqsave(&host->lock, flags);
	if (ios->clock || ios->clock != host->clock) {
	if (ios->clock && ios->clock != host->clock) {
		spin_unlock_irqrestore(&host->lock, flags);
		host->ops->set_clock(host, ios->clock);
		spin_lock_irqsave(&host->lock, flags);