diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 15:03:27 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 15:03:27 +0200 |
commit | 5ece2399181a5abaf42a4cb607463770686778e6 (patch) | |
tree | 5c789755fce670511f2ac1bc3eebf39e26ed1724 /drivers/cpufreq/ppc_cbe_cpufreq.c | |
parent | bf8102228a8bf053051f311e5486042fe0542894 (diff) | |
parent | 8d65775d17941d6d41f5913fc6a99a134c588e01 (diff) | |
download | linux-5ece2399181a5abaf42a4cb607463770686778e6.tar.gz linux-5ece2399181a5abaf42a4cb607463770686778e6.tar.bz2 linux-5ece2399181a5abaf42a4cb607463770686778e6.zip |
Merge back earlier cpufreq material.
Conflicts:
arch/mips/loongson/lemote-2f/clock.c
drivers/cpufreq/intel_pstate.c
Diffstat (limited to 'drivers/cpufreq/ppc_cbe_cpufreq.c')
-rw-r--r-- | drivers/cpufreq/ppc_cbe_cpufreq.c | 9 |
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) static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) { + struct cpufreq_frequency_table *pos; const u32 *max_freqp; u32 max_freq; - int i, cur_pmode; + int cur_pmode; struct device_node *cpu; cpu = of_get_cpu_node(policy->cpu, NULL); @@ -102,9 +103,9 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) pr_debug("initializing frequency table\n"); /* initialize frequency table */ - for (i=0; cbe_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) { - cbe_freqs[i].frequency = max_freq / cbe_freqs[i].driver_data; - pr_debug("%d: %d\n", i, cbe_freqs[i].frequency); + cpufreq_for_each_entry(pos, cbe_freqs) { + pos->frequency = max_freq / pos->driver_data; + pr_debug("%d: %d\n", (int)(pos - cbe_freqs), pos->frequency); } /* if DEBUG is enabled set_pmode() measures the latency |