aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorEmilio López <emilio@elopez.com.ar>2013-02-25 11:07:45 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-04 14:23:11 +0100
commitf5f43dcfff3a3c7f7de4a0cfca0106a0ccd58bd7 (patch)
tree816bcf30003af000ce4edf5fc09a79c45a7b58ab /drivers/cpufreq
parent4b87581036849723242cadaa161e9b01234ef9ae (diff)
cpufreq: highbank: do not initialize array with a loop
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>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/highbank-cpufreq.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/cpufreq/highbank-cpufreq.c b/drivers/cpufreq/highbank-cpufreq.c
index 66e3a71b81a..b61b5a3fad6 100644
--- 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);
}