diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-01 02:50:47 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-01 02:50:47 +0400 |
commit | 89d4f82aa5ccf08dc28dc8b463844e6d7eed591b (patch) | |
tree | 91e7e6ff2c5eda51bb48528244387f32c000433e /drivers/cpufreq/powernow-k6.c | |
parent | 6712d2931933ada259b82f06c03a855b19937074 (diff) | |
parent | 4229e1c61a4a7ac21d5d0790f6add1c9b98d33e7 (diff) | |
download | linux-89d4f82aa5ccf08dc28dc8b463844e6d7eed591b.tar.xz |
Merge branch 'cpufreq-macros' into pm-cpufreq
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 */ |