diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 17:03:27 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 17:03:27 +0400 |
commit | 5ece2399181a5abaf42a4cb607463770686778e6 (patch) | |
tree | 5c789755fce670511f2ac1bc3eebf39e26ed1724 /arch/arm | |
parent | bf8102228a8bf053051f311e5486042fe0542894 (diff) | |
parent | 8d65775d17941d6d41f5913fc6a99a134c588e01 (diff) | |
download | linux-5ece2399181a5abaf42a4cb607463770686778e6.tar.xz |
Merge back earlier cpufreq material.
Conflicts:
arch/mips/loongson/lemote-2f/clock.c
drivers/cpufreq/intel_pstate.c
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-davinci/da850.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 85399c98f84a..45ce065e7170 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -1092,20 +1092,21 @@ int da850_register_cpufreq(char *async_clk) static int da850_round_armrate(struct clk *clk, unsigned long rate) { - int i, ret = 0, diff; + int ret = 0, diff; unsigned int best = (unsigned int) -1; struct cpufreq_frequency_table *table = cpufreq_info.freq_table; + struct cpufreq_frequency_table *pos; rate /= 1000; /* convert to kHz */ - for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) { - diff = table[i].frequency - rate; + cpufreq_for_each_entry(pos, table) { + diff = pos->frequency - rate; if (diff < 0) diff = -diff; if (diff < best) { best = diff; - ret = table[i].frequency; + ret = pos->frequency; } } |