diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-03-30 06:55:15 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-04 08:25:59 -0400 |
commit | 5070158804b5339c71809f5e673cea1cfacd804d (patch) | |
tree | 42256e81e326af4e568a179787e66d434a0b1ffc /arch/powerpc | |
parent | 2361be23666232dbb4851a527f466c4cbf5340fc (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 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pasemi/cpufreq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c index be1e7958909e..b704da404067 100644 --- a/arch/powerpc/platforms/pasemi/cpufreq.c +++ b/arch/powerpc/platforms/pasemi/cpufreq.c | |||
@@ -204,7 +204,8 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
204 | 204 | ||
205 | /* initialize frequency table */ | 205 | /* initialize frequency table */ |
206 | for (i=0; pas_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) { | 206 | for (i=0; pas_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) { |
207 | pas_freqs[i].frequency = get_astate_freq(pas_freqs[i].index) * 100000; | 207 | pas_freqs[i].frequency = |
208 | get_astate_freq(pas_freqs[i].driver_data) * 100000; | ||
208 | pr_debug("%d: %d\n", i, pas_freqs[i].frequency); | 209 | pr_debug("%d: %d\n", i, pas_freqs[i].frequency); |
209 | } | 210 | } |
210 | 211 | ||
@@ -280,7 +281,7 @@ static int pas_cpufreq_target(struct cpufreq_policy *policy, | |||
280 | pr_debug("setting frequency for cpu %d to %d kHz, 1/%d of max frequency\n", | 281 | pr_debug("setting frequency for cpu %d to %d kHz, 1/%d of max frequency\n", |
281 | policy->cpu, | 282 | policy->cpu, |
282 | pas_freqs[pas_astate_new].frequency, | 283 | pas_freqs[pas_astate_new].frequency, |
283 | pas_freqs[pas_astate_new].index); | 284 | pas_freqs[pas_astate_new].driver_data); |
284 | 285 | ||
285 | current_astate = pas_astate_new; | 286 | current_astate = pas_astate_new; |
286 | 287 | ||