Browse Source

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>
Wolfram Sang 9 years ago
parent
commit
3072ba8cd9
1 changed files with 1 additions and 4 deletions
  1. 1 4
      drivers/mmc/host/sh_mobile_sdhi.c

+ 1 - 4
drivers/mmc/host/sh_mobile_sdhi.c

@@ -165,12 +165,9 @@ static unsigned int sh_mobile_sdhi_clk_update(struct tmio_mmc_host *host,
 					      unsigned int new_clock)
 					      unsigned int new_clock)
 {
 {
 	struct sh_mobile_sdhi *priv = host_to_priv(host);
 	struct sh_mobile_sdhi *priv = host_to_priv(host);
-	unsigned int freq, best_freq, diff_min, diff;
+	unsigned int freq, diff, best_freq = 0, diff_min = ~0;
 	int i;
 	int i;
 
 
-	diff_min = ~0;
-	best_freq = 0;
-
 	/*
 	/*
 	 * We want the bus clock to be as close as possible to, but no
 	 * We want the bus clock to be as close as possible to, but no
 	 * greater than, new_clock.  As we can divide by 1 << i for
 	 * greater than, new_clock.  As we can divide by 1 << i for