diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-05-18 17:55:31 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-06-02 23:24:39 +0200 |
commit | bf2be2de8493dd5f86d6e0f0d4eecb5810ad035b (patch) | |
tree | 05d69ad3b73c83f78656d56cbd23e88f6cb33585 /kernel/sched/cpufreq_schedutil.c | |
parent | 666f4ccc5d0f713500f5235eb3f12c1ea8d2278a (diff) | |
download | linux-bf2be2de8493dd5f86d6e0f0d4eecb5810ad035b.tar.gz linux-bf2be2de8493dd5f86d6e0f0d4eecb5810ad035b.tar.bz2 linux-bf2be2de8493dd5f86d6e0f0d4eecb5810ad035b.zip |
cpufreq: governor: Create cpufreq_policy_apply_limits()
Create a new helper to avoid code duplication across governors.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/sched/cpufreq_schedutil.c')
-rw-r--r-- | kernel/sched/cpufreq_schedutil.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index fdcee3cf38fc..758efd7f3abe 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -463,14 +463,7 @@ static void sugov_limits(struct cpufreq_policy *policy) if (!policy->fast_switch_enabled) { mutex_lock(&sg_policy->work_lock); - - if (policy->max < policy->cur) - __cpufreq_driver_target(policy, policy->max, - CPUFREQ_RELATION_H); - else if (policy->min > policy->cur) - __cpufreq_driver_target(policy, policy->min, - CPUFREQ_RELATION_L); - + cpufreq_policy_apply_limits(policy); mutex_unlock(&sg_policy->work_lock); } |