From: Adrian Hunter Subject: [PATCH V4 6/7] sdhci: Always pass clock request value zero to set_clock host op Date: Tue, 27 Dec 2011 15:48:46 +0200 Message-ID: <1324993727-7508-7-git-send-email-adrian.hunter@intel.com> References: <1324993727-7508-1-git-send-email-adrian.hunter@intel.com> Return-path: Received: from mga11.intel.com ([192.55.52.93]:38094 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753894Ab1L0NtH (ORCPT ); Tue, 27 Dec 2011 08:49:07 -0500 In-Reply-To: <1324993727-7508-1-git-send-email-adrian.hunter@intel.com> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Chris Ball Cc: linux-mmc@vger.kernel.org, Todd Poynor From: Todd Poynor 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. Signed-off-by: Todd Poynor Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 6f1fd02..e062997 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1068,7 +1068,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) u16 clk = 0; unsigned long timeout; - if (clock == host->clock) + if (clock && clock == host->clock) return; host->mmc->actual_clock = 0; -- 1.7.6.4