Skip to content

Commit

Permalink
cpufreq: highbank: do not initialize array with a loop
Browse files Browse the repository at this point in the history
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 <emilio@elopez.com.ar>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-By: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Emilio López authored and Rafael J. Wysocki committed Mar 4, 2013
1 parent 4b87581 commit f5f43dc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/cpufreq/highbank-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f5f43dc

Please sign in to comment.