mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 01:09:38 -05:00
cpufreq: ppc: use cpufreq_table_validate_and_show()
Lets use cpufreq_table_validate_and_show() instead of calling cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr(). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
b147405aa8
commit
6b4147db3d
2 changed files with 2 additions and 5 deletions
|
@ -202,7 +202,7 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||||
table[i].frequency = CPUFREQ_TABLE_END;
|
table[i].frequency = CPUFREQ_TABLE_END;
|
||||||
|
|
||||||
/* set the min and max frequency properly */
|
/* set the min and max frequency properly */
|
||||||
ret = cpufreq_frequency_table_cpuinfo(policy, table);
|
ret = cpufreq_table_validate_and_show(policy, table);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("invalid frequency table: %d\n", ret);
|
pr_err("invalid frequency table: %d\n", ret);
|
||||||
goto err_nomem1;
|
goto err_nomem1;
|
||||||
|
@ -219,7 +219,6 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||||
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
|
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
|
||||||
policy->cur = corenet_cpufreq_get_speed(policy->cpu);
|
policy->cur = corenet_cpufreq_get_speed(policy->cpu);
|
||||||
|
|
||||||
cpufreq_frequency_table_get_attr(table, cpu);
|
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -123,11 +123,9 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||||
cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu));
|
cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cpufreq_frequency_table_get_attr(cbe_freqs, policy->cpu);
|
|
||||||
|
|
||||||
/* this ensures that policy->cpuinfo_min
|
/* this ensures that policy->cpuinfo_min
|
||||||
* and policy->cpuinfo_max are set correctly */
|
* and policy->cpuinfo_max are set correctly */
|
||||||
return cpufreq_frequency_table_cpuinfo(policy, cbe_freqs);
|
return cpufreq_table_validate_and_show(policy, cbe_freqs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy)
|
static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy)
|
||||||
|
|
Loading…
Add table
Reference in a new issue