summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/dbx500-cpufreq.c
diff options
context:
space:
mode:
authorStratos Karafotis <stratosk@semaphore.gr>2014-04-26 00:15:38 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-30 02:06:21 +0400
commit041526f915a90b2b628cd0253e2c85da8040276d (patch)
tree0d2a0c45505584f942bd30723af84d2c09261de3 /drivers/cpufreq/dbx500-cpufreq.c
parent27e289dce29764e488c1e13e9aa6950cad1f4aab (diff)
downloadlinux-041526f915a90b2b628cd0253e2c85da8040276d.tar.xz
cpufreq: Use cpufreq_for_each_* macros for frequency table iteration
The cpufreq core now supports the cpufreq_for_each_entry and cpufreq_for_each_valid_entry macros helpers for iteration over the cpufreq_frequency_table, so use them. It should have no functional changes. Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/dbx500-cpufreq.c')
-rw-r--r--drivers/cpufreq/dbx500-cpufreq.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 412a78bb0c94..4bebc1b5db48 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -45,7 +45,7 @@ static struct cpufreq_driver dbx500_cpufreq_driver = {
static int dbx500_cpufreq_probe(struct platform_device *pdev)
{
- int i = 0;
+ struct cpufreq_frequency_table *pos;
freq_table = dev_get_platdata(&pdev->dev);
if (!freq_table) {
@@ -60,10 +60,8 @@ static int dbx500_cpufreq_probe(struct platform_device *pdev)
}
pr_info("dbx500-cpufreq: Available frequencies:\n");
- while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
- pr_info(" %d Mhz\n", freq_table[i].frequency/1000);
- i++;
- }
+ cpufreq_for_each_entry(pos, freq_table)
+ pr_info(" %d Mhz\n", pos->frequency / 1000);
return cpufreq_register_driver(&dbx500_cpufreq_driver);
}