cpufreq: loongson2: use cpufreq_generic_init()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 3 Oct 2013 14:59:16 +0000 (20:29 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 15 Oct 2013 22:50:34 +0000 (00:50 +0200)
Use generic cpufreq_generic_init() routine instead of replicating the same code
here. This driver wasn't setting transition_latency and so is getting set to 0
by default. Lets mark it explicitly by calling the generic routine with
transition_latency as 0.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/loongson2_cpufreq.c

index dd4f3e46f7245b3c6d71a0d5203907370507ded4..2c8ec8e064490be7d56b4e591960b2e11a4bf813 100644 (file)
@@ -131,8 +131,7 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy)
                return ret;
        }
 
-       return cpufreq_table_validate_and_show(policy,
-                                           &loongson2_clockmod_table[0]);
+       return cpufreq_generic_init(policy, &loongson2_clockmod_table[0], 0);
 }
 
 static int loongson2_cpufreq_exit(struct cpufreq_policy *policy)