cpufreq: intel_pstate: Reuse refresh_frequency_limits()
The implementation of intel_pstate_update_max_freq() is quite similar to refresh_frequency_limits(), lets reuse it. Finding minimum of policy->user_policy.max and policy->cpuinfo.max_freq in intel_pstate_update_max_freq() is redundant as cpufreq_set_policy() will call the ->verify() callback of intel-pstate driver, which will do this comparison anyway and so dropping it from intel_pstate_update_max_freq() doesn't harm. 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
67d874c3b2
commit
c57b25bdf7
@@ -1116,7 +1116,7 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, unsigned int cp
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void refresh_frequency_limits(struct cpufreq_policy *policy)
|
||||
void refresh_frequency_limits(struct cpufreq_policy *policy)
|
||||
{
|
||||
struct cpufreq_policy new_policy;
|
||||
|
||||
@@ -1129,6 +1129,7 @@ static void refresh_frequency_limits(struct cpufreq_policy *policy)
|
||||
cpufreq_set_policy(policy, &new_policy);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(refresh_frequency_limits);
|
||||
|
||||
static void handle_update(struct work_struct *work)
|
||||
{
|
||||
|
Reference in New Issue
Block a user