From: Todd Poynor Date: Mon, 11 Oct 2010 23:51:28 +0000 (-0700) Subject: sdhci: Always pass clock request value zero to set_clock host op X-Git-Tag: firefly_0821_release~9833^2~5^2~97 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=762476fa24df17914e1a8fab42e12d59da87539a;p=firefly-linux-kernel-4.4.55.git sdhci: Always pass clock request value zero to set_clock host op To allow the set_clock host op to disable the SDCLK source when not needed, always call the host op when the requested clock speed is zero. Do this even if host->clock already equals zero, because the SDHCI driver may set that value (without calling the host op) to force an update at the next (non-zero-speed) call. Change-Id: If99230d76138679b5767f77cb925f15408ae518e Signed-off-by: Todd Poynor --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 401527d273b5..f7695c4c169e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -987,7 +987,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) u16 clk; unsigned long timeout; - if (clock == host->clock) + if (clock && clock == host->clock) return; if (host->ops->set_clock) {