Message ID | CAKohpo=5RHRFw_OfVZHAoAR-3xnUTMot6z_h=cWsFFgn=Fzw2Q@mail.gmail.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers | show |
On 3/25/2013 3:54 PM, Viresh Kumar wrote: > On 25 March 2013 15:11, Sekhar Nori <nsekhar@ti.com> wrote: >> So down in the cpufreq driver probe below, we bail out if freq_table is >> not provided. So all this checking for freq_table in the code you pasted >> above is superfluous. If you can clean that part up and add checking for >> cpufreq_frequency_table_cpuinfo() as you proposed, I will be glad to >> test it out ;) > > Attached is the complete patch and following is your fixup for davinci > (just to review): For the attached patch, [nsekhar@ti.com: tested on da850 evm] Acked-by: Sekhar Nori <nsekhar@ti.com> Thanks, sekhar -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c index ff46862..7c2e943 100644 --- a/arch/arm/mach-davinci/cpufreq.c +++ b/arch/arm/mach-davinci/cpufreq.c @@ -137,18 +137,17 @@ static int davinci_cpu_init(struct cpufreq_policy *policy) return result; } - policy->cur = policy->min = policy->max = davinci_getspeed(0); - - if (freq_table) { - result = cpufreq_frequency_table_cpuinfo(policy, freq_table); - if (!result) - cpufreq_frequency_table_get_attr(freq_table, - policy->cpu); - } else { - policy->cpuinfo.min_freq = policy->min; - policy->cpuinfo.max_freq = policy->max; + policy->cur = davinci_getspeed(0); + + result = cpufreq_frequency_table_cpuinfo(policy, freq_table); + if (result) { + pr_err("%s: cpufreq_frequency_table_cpuinfo() failed", + __func__); + return result; } + cpufreq_frequency_table_get_attr(freq_table, policy->cpu); + /* * Time measurement across the target() function yields ~1500-1800us * time taken with no drivers on notification list.