Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544913

[PATCH 1/4] mmc: core: Return from mmc_set_clock if hz is already set to ios.clock

From Ritesh Harjani <riteshh@codeaurora.org>
Newsgroups linux.kernel
Subject [PATCH 1/4] mmc: core: Return from mmc_set_clock if hz is already set to ios.clock
Date 2016-12-20 07:00 +0100
Message-ID <sQlCV-1sf-13@gated-at.bofh.it> (permalink)
References <sQlCV-1sf-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
---
 drivers/mmc/core/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 543eadd..125f8a9 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1139,6 +1139,9 @@ void mmc_set_clock(struct mmc_host *host, unsigned int hz)
 	if (hz > host->f_max)
 		hz = host->f_max;
 
+	if (hz == host->ios.clock)
+		return;
+
 	host->ios.clock = hz;
 	mmc_set_ios(host);
 }
-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
a Linux Foundation Collaborative Project.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 1/4] mmc: core: Return from mmc_set_clock if hz is already set to ios.clock Ritesh Harjani <riteshh@codeaurora.org> - 2016-12-20 07:00 +0100

csiph-web