[ARM] pxa/cpufreq: fix index assignments for end marker
authorDaniel Mack <daniel@caiaq.de>
Fri, 20 Nov 2009 16:50:34 +0000 (17:50 +0100)
committerEric Miao <eric.y.miao@gmail.com>
Fri, 20 Nov 2009 20:23:13 +0000 (14:23 -0600)
I stumbled over two small things regarding the .index field assignment
in the dynamically created cpu frequency tables for pxa2xx and pxa3xx.

Even though that doesn't currently cause any problem, it should still be
fixed in case the logic in the CPUFREQ core changes.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
arch/arm/mach-pxa/cpufreq-pxa2xx.c
arch/arm/mach-pxa/cpufreq-pxa3xx.c

index 983cc8c2008190db5e686f65a69f2a47bd2fd5cc..9e4d9816726ad5d75c0657f9a32d0b36c0ec3aa7 100644 (file)
@@ -447,6 +447,7 @@ static __init int pxa_cpufreq_init(struct cpufreq_policy *policy)
                pxa27x_freq_table[i].frequency = freq;
                pxa27x_freq_table[i].index = i;
        }
+       pxa27x_freq_table[i].index = i;
        pxa27x_freq_table[i].frequency = CPUFREQ_TABLE_END;
 
        /*
index 67f34a8d8e60ee58c7f9257fd4812d9dd827dc34..149cdd9aee4d51d23977d769d1a3d041897f12ee 100644 (file)
@@ -102,7 +102,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy,
                table[i].index = i;
                table[i].frequency = freqs[i].cpufreq_mhz * 1000;
        }
-       table[num].frequency = i;
+       table[num].index = i;
        table[num].frequency = CPUFREQ_TABLE_END;
 
        pxa3xx_freqs = freqs;