mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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
@@ -246,11 +246,8 @@ static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index)
|
||||
new_freq = s5pv210_freq_table[index].frequency;
|
||||
|
||||
/* Finding current running level index */
|
||||
if (cpufreq_frequency_table_target(policy, old_freq, CPUFREQ_RELATION_H,
|
||||
&priv_index)) {
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
priv_index = cpufreq_frequency_table_target(policy, old_freq,
|
||||
CPUFREQ_RELATION_H);
|
||||
|
||||
arm_volt = dvs_conf[index].arm_volt;
|
||||
int_volt = dvs_conf[index].int_volt;
|
||||
|
||||
Reference in New Issue
Block a user