diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-01 00:50:47 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-01 00:50:47 +0200 |
commit | 89d4f82aa5ccf08dc28dc8b463844e6d7eed591b (patch) | |
tree | 91e7e6ff2c5eda51bb48528244387f32c000433e /arch/arm/mach-davinci/da850.c | |
parent | cpufreq: ppc-corenet-cpufreq: Fix __udivdi3 modpost error (diff) | |
parent | sh: clk: Use cpufreq_for_each_valid_entry macro for iteration (diff) | |
download | linux-89d4f82aa5ccf08dc28dc8b463844e6d7eed591b.tar.xz linux-89d4f82aa5ccf08dc28dc8b463844e6d7eed591b.zip |
Merge branch 'cpufreq-macros' into pm-cpufreq
Diffstat (limited to 'arch/arm/mach-davinci/da850.c')
-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; } } |