diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2021-06-29 09:27:08 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-06-30 20:45:42 +0300 |
commit | b3beca76181681fce9cf72f37d19c3030e3353c0 (patch) | |
tree | 7924e504285183d0d5ee85251a15c0d9b1061833 /drivers/cpufreq | |
parent | f9ccdec24d91ffddf1c6f4173b0e191fc08c7d14 (diff) | |
download | linux-b3beca76181681fce9cf72f37d19c3030e3353c0.tar.xz |
cpufreq: Remove ->resolve_freq()
Commit e3c062360870 ("cpufreq: add cpufreq_driver_resolve_freq()")
introduced this callback, back in 2016, for drivers that provide the
->target() callback.
The kernel hasn't seen a single user of it in the past 5 years and
it is not likely to be used any time soon.
Remove it for now.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 8271ed1a4947..45f3416988f1 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -527,22 +527,17 @@ EXPORT_SYMBOL_GPL(cpufreq_disable_fast_switch); static unsigned int __resolve_freq(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) { - target_freq = clamp_val(target_freq, policy->min, policy->max); - policy->cached_target_freq = target_freq; + unsigned int idx; - if (cpufreq_driver->target_index) { - unsigned int idx; - - idx = cpufreq_frequency_table_target(policy, target_freq, - relation); - policy->cached_resolved_idx = idx; - return policy->freq_table[idx].frequency; - } + target_freq = clamp_val(target_freq, policy->min, policy->max); - if (cpufreq_driver->resolve_freq) - return cpufreq_driver->resolve_freq(policy, target_freq); + if (!cpufreq_driver->target_index) + return target_freq; - return target_freq; + idx = cpufreq_frequency_table_target(policy, target_freq, relation); + policy->cached_resolved_idx = idx; + policy->cached_target_freq = target_freq; + return policy->freq_table[idx].frequency; } /** |