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/powernow-k6.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/powernow-k6.c')
-rw-r--r-- | drivers/cpufreq/powernow-k6.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c index 78904e6ca4a0..c8012bc86910 100644 --- a/drivers/cpufreq/powernow-k6.c +++ b/drivers/cpufreq/powernow-k6.c @@ -151,6 +151,7 @@ static int powernow_k6_target(struct cpufreq_policy *policy, static int powernow_k6_cpu_init(struct cpufreq_policy *policy) { + struct cpufreq_frequency_table *pos; unsigned int i, f; unsigned khz; @@ -168,12 +169,11 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) } } if (param_max_multiplier) { - for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) { - if (clock_ratio[i].driver_data == param_max_multiplier) { + cpufreq_for_each_entry(pos, clock_ratio) + if (pos->driver_data == param_max_multiplier) { max_multiplier = param_max_multiplier; goto have_max_multiplier; } - } printk(KERN_ERR "powernow-k6: invalid max_multiplier parameter, valid parameters 20, 30, 35, 40, 45, 50, 55, 60\n"); return -EINVAL; } @@ -201,12 +201,12 @@ have_busfreq: param_busfreq = busfreq * 10; /* table init */ - for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) { - f = clock_ratio[i].driver_data; + cpufreq_for_each_entry(pos, clock_ratio) { + f = pos->driver_data; if (f > max_multiplier) - clock_ratio[i].frequency = CPUFREQ_ENTRY_INVALID; + pos->frequency = CPUFREQ_ENTRY_INVALID; else - clock_ratio[i].frequency = busfreq * f; + pos->frequency = busfreq * f; } /* cpuinfo and default policy values */ |