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:
4b87581
)
cpufreq: highbank: do not initialize array with a loop
author
Emilio López
<
[email protected]
>
Mon, 25 Feb 2013 11:07:45 +0000
(11:07 +0000)
committer
Rafael J. Wysocki
<
[email protected]
>
Mon, 4 Mar 2013 13:23:11 +0000
(14:23 +0100)
As uninitialized array members will be initialized to zero, we can
avoid using a for loop by setting a value to it.
Signed-off-by: Emilio López <
[email protected]
>
Acked-by: Viresh Kumar <
[email protected]
>
Acked-By: Mark Langsdorf <
[email protected]
>
Signed-off-by: Rafael J. Wysocki <
[email protected]
>
drivers/cpufreq/highbank-cpufreq.c
patch
|
blob
|
history
diff --git
a/drivers/cpufreq/highbank-cpufreq.c
b/drivers/cpufreq/highbank-cpufreq.c
index 66e3a71b81a32f5c71242aca6bdfe4961b16587b..b61b5a3fad64983cc1681f89dc599649bf129bde 100644
(file)
--- a/
drivers/cpufreq/highbank-cpufreq.c
+++ b/
drivers/cpufreq/highbank-cpufreq.c
@@
-28,13
+28,7
@@
static int hb_voltage_change(unsigned int freq)
{
- int i;
- u32 msg[HB_CPUFREQ_IPC_LEN];
-
- msg[0] = HB_CPUFREQ_CHANGE_NOTE;
- msg[1] = freq / 1000000;
- for (i = 2; i < HB_CPUFREQ_IPC_LEN; i++)
- msg[i] = 0;
+ u32 msg[HB_CPUFREQ_IPC_LEN] = {HB_CPUFREQ_CHANGE_NOTE, freq / 1000000};
return pl320_ipc_transmit(msg);
}