Message ID | 20160722151327.GP3122@ubuntu |
---|---|
State | New |
Headers | show |
On 22-07-16, 23:11, Rafael J. Wysocki wrote: > No, they aren't deprecated, not even sort of. > > Of course, stuff that can use frequency tables should implement ->target_index, > because there's no valid reason for it not to do that. > > However, there are cases (and not legacy) where frequency tables are simply > impractical and those drivers have no choice but to implement ->target. > > And if you want to try to force them into the frequency tables model > regardless, then think twice, because I'm not going to let you do that. No I am not :) Perhaps this was just mis-worded in the Documentation then. -- viresh -- 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/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 3dd4884c6f9e..91d8ec4c8eb7 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -517,7 +517,7 @@ unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, return policy->freq_table[idx].frequency; } - if (cpufreq_driver->resolve_freq) + if (likely(cpufreq_driver->resolve_freq)) return cpufreq_driver->resolve_freq(policy, target_freq); return target_freq;