From: Viresh Kumar Date: Thu, 3 Oct 2013 14:59:16 +0000 (+0530) Subject: cpufreq: loongson2: use cpufreq_generic_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0b2da585f286ffa86cd24c0df1c1440d9dae19f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git cpufreq: loongson2: use cpufreq_generic_init() 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 Acked-by: Aaro Koskinen Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c index dd4f3e46f724..2c8ec8e06449 100644 --- a/drivers/cpufreq/loongson2_cpufreq.c +++ b/drivers/cpufreq/loongson2_cpufreq.c @@ -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)