Skip to contentSkip to conversation

ARM: PXA: CPUFREQ: Fix index assignments for end marker

PATCH New Daniel Mack 1 participant 1 message Nov 20, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: PXA: CPUFREQ: Fix index assignments for end marker

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.

---
 arch/arm/mach-pxa/cpufreq-pxa2xx.c |    1 +
 arch/arm/mach-pxa/cpufreq-pxa3xx.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mach-pxa/cpufreq-pxa2xx.c +1 -0
index 983cc8c..9e4d981 100644
@@ -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;
 
 	/*
arch/arm/mach-pxa/cpufreq-pxa3xx.c +1 -1
index 67f34a8..149cdd9 100644
@@ -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;
Signature · 1 line
1.6.5.2