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>
此提交包含在:
@@ -91,8 +91,8 @@ static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy,
|
||||
else {
|
||||
unsigned int index;
|
||||
|
||||
cpufreq_frequency_table_target(policy,
|
||||
policy->cur - 1, CPUFREQ_RELATION_H, &index);
|
||||
index = cpufreq_frequency_table_target(policy,
|
||||
policy->cur - 1, CPUFREQ_RELATION_H);
|
||||
freq_next = policy->freq_table[index].frequency;
|
||||
}
|
||||
|
||||
|
新增問題並參考
封鎖使用者