]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
cpufreq: dbx500: use cpufreq_generic_init()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 3 Oct 2013 14:59:12 +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.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/dbx500-cpufreq.c

index ae1aa60b138afc0f419eb33cebf0e58ee6f992e9..a60f7693c18e1b93809d53c5835c89583a8af379 100644 (file)
@@ -74,26 +74,7 @@ static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu)
 
 static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
 {
-       int res;
-
-       /* get policy fields based on the table */
-       res = cpufreq_table_validate_and_show(policy, freq_table);
-       if (res) {
-               pr_err("dbx500-cpufreq: Failed to read policy table\n");
-               return res;
-       }
-
-       /*
-        * FIXME : Need to take time measurement across the target()
-        *         function with no/some/all drivers in the notification
-        *         list.
-        */
-       policy->cpuinfo.transition_latency = 20 * 1000; /* in ns */
-
-       /* policy sharing between dual CPUs */
-       cpumask_setall(policy->cpus);
-
-       return 0;
+       return cpufreq_generic_init(policy, freq_table, 20 * 1000);
 }
 
 static struct cpufreq_driver dbx500_cpufreq_driver = {