aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-03-30 06:55:15 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-04 08:25:59 -0400
commit5070158804b5339c71809f5e673cea1cfacd804d (patch)
tree42256e81e326af4e568a179787e66d434a0b1ffc /drivers/base
parent2361be23666232dbb4851a527f466c4cbf5340fc (diff)
cpufreq: rename index as driver_data in cpufreq_frequency_table
The "index" field of struct cpufreq_frequency_table was never an index and isn't used at all by the cpufreq core. It only is useful for cpufreq drivers for their internal purposes. Many people nowadays blindly set it in ascending order with the assumption that the core will use it, which is a mistake. Rename it to "driver_data" as that's what its purpose is. All of its users are updated accordingly. [rjw: Changelog] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/opp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index f0077cb8e249..c8ec186303db 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -648,14 +648,14 @@ int opp_init_cpufreq_table(struct device *dev,
648 648
649 list_for_each_entry(opp, &dev_opp->opp_list, node) { 649 list_for_each_entry(opp, &dev_opp->opp_list, node) {
650 if (opp->available) { 650 if (opp->available) {
651 freq_table[i].index = i; 651 freq_table[i].driver_data = i;
652 freq_table[i].frequency = opp->rate / 1000; 652 freq_table[i].frequency = opp->rate / 1000;
653 i++; 653 i++;
654 } 654 }
655 } 655 }
656 mutex_unlock(&dev_opp_list_lock); 656 mutex_unlock(&dev_opp_list_lock);
657 657
658 freq_table[i].index = i; 658 freq_table[i].driver_data = i;
659 freq_table[i].frequency = CPUFREQ_TABLE_END; 659 freq_table[i].frequency = CPUFREQ_TABLE_END;
660 660
661 *table = &freq_table[0]; 661 *table = &freq_table[0];