]> Pileus Git - ~andy/linux/commitdiff
cpufreq: cpufreq-cpu0: use cpufreq_generic_init()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 3 Oct 2013 14:59:09 +0000 (20:29 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 15 Oct 2013 22:50:33 +0000 (00:50 +0200)
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq-cpu0.c

index 3c09a265903fea1f90480401cc56aa192f419dd0..582888db605836f69f3f4b9f44d05dd2c10f4ef1 100644 (file)
@@ -122,24 +122,7 @@ post_notify:
 
 static int cpu0_cpufreq_init(struct cpufreq_policy *policy)
 {
-       int ret;
-
-       ret = cpufreq_table_validate_and_show(policy, freq_table);
-       if (ret) {
-               pr_err("invalid frequency table: %d\n", ret);
-               return ret;
-       }
-
-       policy->cpuinfo.transition_latency = transition_latency;
-
-       /*
-        * The driver only supports the SMP configuartion where all processors
-        * share the clock and voltage and clock.  Use cpufreq affected_cpus
-        * interface to have all CPUs scaled together.
-        */
-       cpumask_setall(policy->cpus);
-
-       return 0;
+       return cpufreq_generic_init(policy, freq_table, transition_latency);
 }
 
 static struct cpufreq_driver cpu0_cpufreq_driver = {