]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commitf16acc023baeb0260f1c9cf33f94aba8829a851a
tree59002baad22e0f8f5ba2a6b8d652c591798780b9
parentef25348441caf439769e47cc27c2cbf625c8c2b9
[CPUFREQ] db8500: fix build error due to undeclared i variable

The variable i is removed by commit d05dff1
"[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