aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/ppc_cbe_cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/ppc_cbe_cpufreq.c')
-rw-r--r--drivers/cpufreq/ppc_cbe_cpufreq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c b/drivers/cpufreq/ppc_cbe_cpufreq.c
index 5be8a48dba74..5a4c5a639f61 100644
--- a/drivers/cpufreq/ppc_cbe_cpufreq.c
+++ b/drivers/cpufreq/ppc_cbe_cpufreq.c
@@ -67,9 +67,10 @@ static int set_pmode(unsigned int cpu, unsigned int slow_mode)
67 67
68static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) 68static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy)
69{ 69{
70 struct cpufreq_frequency_table *pos;
70 const u32 *max_freqp; 71 const u32 *max_freqp;
71 u32 max_freq; 72 u32 max_freq;
72 int i, cur_pmode; 73 int cur_pmode;
73 struct device_node *cpu; 74 struct device_node *cpu;
74 75
75 cpu = of_get_cpu_node(policy->cpu, NULL); 76 cpu = of_get_cpu_node(policy->cpu, NULL);
@@ -102,9 +103,9 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy)
102 pr_debug("initializing frequency table\n"); 103 pr_debug("initializing frequency table\n");
103 104
104 /* initialize frequency table */ 105 /* initialize frequency table */
105 for (i=0; cbe_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) { 106 cpufreq_for_each_entry(pos, cbe_freqs) {
106 cbe_freqs[i].frequency = max_freq / cbe_freqs[i].driver_data; 107 pos->frequency = max_freq / pos->driver_data;
107 pr_debug("%d: %d\n", i, cbe_freqs[i].frequency); 108 pr_debug("%d: %d\n", (int)(pos - cbe_freqs), pos->frequency);
108 } 109 }
109 110
110 /* if DEBUG is enabled set_pmode() measures the latency 111 /* if DEBUG is enabled set_pmode() measures the latency