[CPUFREQ] db8500: fix build error due to undeclared i variable
authorAxel Lin <axel.lin@gmail.com>
Fri, 4 Nov 2011 12:04:41 +0000 (20:04 +0800)
committerDave Jones <davej@redhat.com>
Sat, 12 Nov 2011 03:28:33 +0000 (22:28 -0500)
commiteb0b38a5d2c063cd8dc9e44415ce08e30d95f571
tree59002baad22e0f8f5ba2a6b8d652c591798780b9
parent8f042aa75afccc45c5b60517f51644bce3f52545
[CPUFREQ] db8500: fix build error due to undeclared i variable

The variable i is removed by commit ded8433
"[CPUFREQ] db8500: remove unneeded for loop iteration over freq_table",
but current code to print available frequencies still uses the i variable.
Thus add the i variable back to fix below buld error:

  CC      drivers/cpufreq/db8500-cpufreq.o
drivers/cpufreq/db8500-cpufreq.c: In function 'db8500_cpufreq_init':
drivers/cpufreq/db8500-cpufreq.c:123: error: 'i' undeclared (first use in this function)
drivers/cpufreq/db8500-cpufreq.c:123: error: (Each undeclared identifier is reported only once
drivers/cpufreq/db8500-cpufreq.c:123: error: for each function it appears in.)
make[2]: *** [drivers/cpufreq/db8500-cpufreq.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2

This patch also fixes using uninitialized i variable as array index.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dave Jones <davej@redhat.com>
drivers/cpufreq/db8500-cpufreq.c