cpufreq: spear: use cpufreq_generic_init()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 3 Oct 2013 15:12:10 +0000 (20:42 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 15 Oct 2013 22:50:35 +0000 (00:50 +0200)
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/spear-cpufreq.c

index aacdb615e4ed6ca11fb8b1ee06814819a9f6b5a8..2a031587f52ce0cd87e4161c08069b446a1b95a3 100644 (file)
@@ -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 = {