On 01-06-16, 00:40, Rafael J. Wysocki wrote:
On Thu, May 26, 2016 at 7:42 AM, Viresh Kumar viresh.kumar@linaro.org wrote:
Most of the callers of cpufreq_frequency_get_table() already have the pointer to a valid policy structure and they don't really need to go through the per-cpu variable first and then a check to validate the frequency, in order to find the freq-table for the policy.
Implement a light weight call for this and update users.
Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
drivers/cpufreq/cpufreq.c | 4 ++-- drivers/cpufreq/cpufreq_ondemand.c | 2 +- drivers/cpufreq/cpufreq_stats.c | 3 +-- drivers/cpufreq/freq_table.c | 4 ++-- drivers/cpufreq/ppc_cbe_cpufreq_pmi.c | 2 +- include/linux/cpufreq.h | 7 +++++++ 6 files changed, 14 insertions(+), 8 deletions(-)
Submitted another version which accesses policy->freq_table directly instead.