aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2016-05-02 16:25:39 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2016-05-04 03:28:03 -0400
commit3072ba8cd95bd0e7fbe9a3a1c9b61fb190257855 (patch)
treea759057d4630c77a07a4e9b75e3b2f18a85af8d7
parent81eef6ca92014845d40e3f1310e42b7010303acc (diff)
mmc: sh_mobile_sdhi: make clk_update function more compact
Save a few lines, the codebase is large enough. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/sh_mobile_sdhi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index f8ea3d1d6de3..6857e4ba7244 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -165,12 +165,9 @@ static unsigned int sh_mobile_sdhi_clk_update(struct tmio_mmc_host *host,
165 unsigned int new_clock) 165 unsigned int new_clock)
166{ 166{
167 struct sh_mobile_sdhi *priv = host_to_priv(host); 167 struct sh_mobile_sdhi *priv = host_to_priv(host);
168 unsigned int freq, best_freq, diff_min, diff; 168 unsigned int freq, diff, best_freq = 0, diff_min = ~0;
169 int i; 169 int i;
170 170
171 diff_min = ~0;
172 best_freq = 0;
173
174 /* 171 /*
175 * We want the bus clock to be as close as possible to, but no 172 * We want the bus clock to be as close as possible to, but no
176 * greater than, new_clock. As we can divide by 1 << i for 173 * greater than, new_clock. As we can divide by 1 << i for