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>
This commit is contained in:

committed by
Rafael J. Wysocki

父節點
2361be2366
當前提交
5070158804
@@ -648,14 +648,14 @@ int opp_init_cpufreq_table(struct device *dev,
|
||||
|
||||
list_for_each_entry(opp, &dev_opp->opp_list, node) {
|
||||
if (opp->available) {
|
||||
freq_table[i].index = i;
|
||||
freq_table[i].driver_data = i;
|
||||
freq_table[i].frequency = opp->rate / 1000;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&dev_opp_list_lock);
|
||||
|
||||
freq_table[i].index = i;
|
||||
freq_table[i].driver_data = i;
|
||||
freq_table[i].frequency = CPUFREQ_TABLE_END;
|
||||
|
||||
*table = &freq_table[0];
|
||||
|
Reference in New Issue
Block a user