diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-10-02 04:43:19 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-15 18:50:23 -0400 |
commit | be49e3465f222b4b796be8a21d14afbfd8f5d20f (patch) | |
tree | e1ef5d9cb453bb3c7f073a4d209d2b63d980aec3 /drivers/cpufreq/intel_pstate.c | |
parent | 0b981e70748861a3e10ea2e2a689bdcee3e15085 (diff) |
cpufreq: add new routine cpufreq_verify_within_cpu_limits()
Most of the users of cpufreq_verify_within_limits() calls it for
limiting with min/max from policy->cpuinfo. We can make that code
simple by introducing another routine which will do this for them
automatically.
This patch adds another routine cpufreq_verify_within_cpu_limits()
and updates others to use it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/intel_pstate.c')
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 9733f29ed148..a02bd77cbfe8 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -611,9 +611,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
611 | 611 | ||
612 | static int intel_pstate_verify_policy(struct cpufreq_policy *policy) | 612 | static int intel_pstate_verify_policy(struct cpufreq_policy *policy) |
613 | { | 613 | { |
614 | cpufreq_verify_within_limits(policy, | 614 | cpufreq_verify_within_cpu_limits(policy); |
615 | policy->cpuinfo.min_freq, | ||
616 | policy->cpuinfo.max_freq); | ||
617 | 615 | ||
618 | if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) && | 616 | if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) && |
619 | (policy->policy != CPUFREQ_POLICY_PERFORMANCE)) | 617 | (policy->policy != CPUFREQ_POLICY_PERFORMANCE)) |