From: Viresh Kumar Date: Thu, 3 Oct 2013 15:12:10 +0000 (+0530) Subject: cpufreq: spear: use cpufreq_generic_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a936bd085372842fd1c9397a80b74e62026c89e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git cpufreq: spear: use cpufreq_generic_init() Use generic cpufreq_generic_init() routine instead of replicating the same code here. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c index aacdb615e4ed..2a031587f52c 100644 --- a/drivers/cpufreq/spear-cpufreq.c +++ b/drivers/cpufreq/spear-cpufreq.c @@ -171,18 +171,8 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy, static int spear_cpufreq_init(struct cpufreq_policy *policy) { - int ret; - - ret = cpufreq_table_validate_and_show(policy, spear_cpufreq.freq_tbl); - if (ret) { - pr_err("cpufreq_table_validate_and_show() failed"); - return ret; - } - - policy->cpuinfo.transition_latency = spear_cpufreq.transition_latency; - cpumask_setall(policy->cpus); - - return 0; + return cpufreq_generic_init(policy, spear_cpufreq.freq_tbl, + spear_cpufreq.transition_latency); } static struct cpufreq_driver spear_cpufreq_driver = {