diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-10-02 10:43:19 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-16 00:50:23 +0200 |
commit | be49e3465f222b4b796be8a21d14afbfd8f5d20f (patch) | |
tree | e1ef5d9cb453bb3c7f073a4d209d2b63d980aec3 /drivers/cpufreq/longrun.c | |
parent | cpufreq: use cpufreq_driver->flags to mark CPUFREQ_HAVE_GOVERNOR_PER_POLICY (diff) | |
download | linux-be49e3465f222b4b796be8a21d14afbfd8f5d20f.tar.xz linux-be49e3465f222b4b796be8a21d14afbfd8f5d20f.zip |
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/longrun.c')
-rw-r--r-- | drivers/cpufreq/longrun.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/cpufreq/longrun.c b/drivers/cpufreq/longrun.c index 5aa031612d53..074971b12635 100644 --- a/drivers/cpufreq/longrun.c +++ b/drivers/cpufreq/longrun.c @@ -129,9 +129,7 @@ static int longrun_verify_policy(struct cpufreq_policy *policy) return -EINVAL; policy->cpu = 0; - cpufreq_verify_within_limits(policy, - policy->cpuinfo.min_freq, - policy->cpuinfo.max_freq); + cpufreq_verify_within_cpu_limits(policy); if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) && (policy->policy != CPUFREQ_POLICY_PERFORMANCE)) |