From 2b3dc761cf2cfaf773ebec5c169494c4a670a419 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Thu, 3 Oct 2013 20:29:12 +0530 Subject: [PATCH] cpufreq: dbx500: use cpufreq_generic_init() Use generic cpufreq_generic_init() routine instead of replicating the same code here. Signed-off-by: Viresh Kumar Acked-by: Linus Walleij Signed-off-by: Rafael J. Wysocki --- drivers/cpufreq/dbx500-cpufreq.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index ae1aa60b138a..a60f7693c18e 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -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 = { -- 2.45.2