projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81eef6c
)
mmc: sh_mobile_sdhi: make clk_update function more compact
author
Wolfram Sang
<
[email protected]
>
Mon, 2 May 2016 20:25:39 +0000
(22:25 +0200)
committer
Ulf Hansson
<
[email protected]
>
Wed, 4 May 2016 07:28:03 +0000
(09:28 +0200)
Save a few lines, the codebase is large enough.
Signed-off-by: Wolfram Sang <
[email protected]
>
Tested-by: Geert Uytterhoeven <
[email protected]
>
Signed-off-by: Ulf Hansson <
[email protected]
>
drivers/mmc/host/sh_mobile_sdhi.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/sh_mobile_sdhi.c
b/drivers/mmc/host/sh_mobile_sdhi.c
index f8ea3d1d6de3823a2c6a6ce15888811261fe7c52..6857e4ba72441576e1e5d5601261e84a60cd1e03 100644
(file)
--- 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,
unsigned int new_clock)
{
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;
- diff_min = ~0;
- best_freq = 0;
-
/*
* 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