cpufreq: Return index from cpufreq_frequency_table_target()
This routine can't fail unless the frequency table is invalid and doesn't contain any valid entries. Make it return the index and WARN() in case it is used for an invalid table. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
2372784542
commit
d218ed7739
@@ -760,8 +760,8 @@ void powernv_cpufreq_work_fn(struct work_struct *work)
|
||||
struct cpufreq_policy policy;
|
||||
|
||||
cpufreq_get_policy(&policy, cpu);
|
||||
cpufreq_frequency_table_target(&policy, policy.cur,
|
||||
CPUFREQ_RELATION_C, &index);
|
||||
index = cpufreq_frequency_table_target(&policy, policy.cur,
|
||||
CPUFREQ_RELATION_C);
|
||||
powernv_cpufreq_target_index(&policy, index);
|
||||
cpumask_andnot(&mask, &mask, policy.cpus);
|
||||
}
|
||||
|
Reference in New Issue
Block a user