mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-19 05:24:11 +00:00
cpufreq: pxa: 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(). Cc: Eric Miao <eric.y.miao@gmail.com> 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
6b4147db3d
commit
15cc921b97
2 changed files with 4 additions and 10 deletions
|
@ -454,12 +454,10 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)
|
||||||
pr_info("PXA255 cpufreq using %s frequency table\n",
|
pr_info("PXA255 cpufreq using %s frequency table\n",
|
||||||
pxa255_turbo_table ? "turbo" : "run");
|
pxa255_turbo_table ? "turbo" : "run");
|
||||||
|
|
||||||
cpufreq_frequency_table_cpuinfo(policy, pxa255_freq_table);
|
cpufreq_table_validate_and_show(policy, pxa255_freq_table);
|
||||||
cpufreq_frequency_table_get_attr(pxa255_freq_table, policy->cpu);
|
|
||||||
}
|
}
|
||||||
else if (cpu_is_pxa27x()) {
|
else if (cpu_is_pxa27x()) {
|
||||||
cpufreq_frequency_table_cpuinfo(policy, pxa27x_freq_table);
|
cpufreq_table_validate_and_show(policy, pxa27x_freq_table);
|
||||||
cpufreq_frequency_table_get_attr(pxa27x_freq_table, policy->cpu);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printk(KERN_INFO "PXA CPU frequency change support initialized\n");
|
printk(KERN_INFO "PXA CPU frequency change support initialized\n");
|
||||||
|
|
|
@ -91,7 +91,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy,
|
||||||
struct pxa3xx_freq_info *freqs, int num)
|
struct pxa3xx_freq_info *freqs, int num)
|
||||||
{
|
{
|
||||||
struct cpufreq_frequency_table *table;
|
struct cpufreq_frequency_table *table;
|
||||||
int i, ret;
|
int i;
|
||||||
|
|
||||||
table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL);
|
table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL);
|
||||||
if (table == NULL)
|
if (table == NULL)
|
||||||
|
@ -108,11 +108,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy,
|
||||||
pxa3xx_freqs_num = num;
|
pxa3xx_freqs_num = num;
|
||||||
pxa3xx_freqs_table = table;
|
pxa3xx_freqs_table = table;
|
||||||
|
|
||||||
ret = cpufreq_frequency_table_cpuinfo(policy, table);
|
return cpufreq_table_validate_and_show(policy, table);
|
||||||
if (!ret)
|
|
||||||
cpufreq_frequency_table_get_attr(table, policy->cpu);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __update_core_freq(struct pxa3xx_freq_info *info)
|
static void __update_core_freq(struct pxa3xx_freq_info *info)
|
||||||
|
|
Loading…
Add table
Reference in a new issue