qcom-cpufreq: Use cpufreq_table_validate_and_show to fill freq_table
cpufreq_table_validate_and_show() is created as a standard way to initialize frequency for a policy and assign freq_table. Use this new API to assign freq_table. CRs-Fixed: 1024229 Change-Id: Iac3a9394790e140492c5c0c0ad6d068840bfffa4 Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
This commit is contained in:
parent
384da356db
commit
ea6de85a0b
1 changed files with 4 additions and 2 deletions
|
@ -143,8 +143,11 @@ static int msm_cpufreq_init(struct cpufreq_policy *policy)
|
|||
if (cpu_clk[cpu] == cpu_clk[policy->cpu])
|
||||
cpumask_set_cpu(cpu, policy->cpus);
|
||||
|
||||
if (cpufreq_frequency_table_cpuinfo(policy, table))
|
||||
ret = cpufreq_table_validate_and_show(policy, table);
|
||||
if (ret) {
|
||||
pr_err("cpufreq: failed to get policy min/max\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
cur_freq = clk_get_rate(cpu_clk[policy->cpu])/1000;
|
||||
|
||||
|
@ -167,7 +170,6 @@ static int msm_cpufreq_init(struct cpufreq_policy *policy)
|
|||
pr_debug("cpufreq: cpu%d init at %d switching to %d\n",
|
||||
policy->cpu, cur_freq, table[index].frequency);
|
||||
policy->cur = table[index].frequency;
|
||||
policy->freq_table = table;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue