summaryrefslogtreecommitdiff
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-02 12:43:19 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-16 02:50:23 +0400
commitbe49e3465f222b4b796be8a21d14afbfd8f5d20f (patch)
treee1ef5d9cb453bb3c7f073a4d209d2b63d980aec3 /include/linux/cpufreq.h
parent0b981e70748861a3e10ea2e2a689bdcee3e15085 (diff)
downloadlinux-be49e3465f222b4b796be8a21d14afbfd8f5d20f.tar.xz
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 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 24b84f7e7f8d..c7495915932d 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -242,6 +242,13 @@ static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy,
return;
}
+static inline void
+cpufreq_verify_within_cpu_limits(struct cpufreq_policy *policy)
+{
+ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
+ policy->cpuinfo.max_freq);
+}
+
/*********************************************************************
* CPUFREQ NOTIFIER INTERFACE *
*********************************************************************/