diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-05-18 14:25:31 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-06-02 23:24:39 +0200 |
commit | bf2be2de8493dd5f86d6e0f0d4eecb5810ad035b (patch) | |
tree | 05d69ad3b73c83f78656d56cbd23e88f6cb33585 /drivers/cpufreq/cpufreq_governor.c | |
parent | cpufreq: governor: Remove unnecessary bits from print message (diff) | |
download | linux-bf2be2de8493dd5f86d6e0f0d4eecb5810ad035b.tar.xz 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 'drivers/cpufreq/cpufreq_governor.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 18eab7f4ba4c..4b88b5bec4ef 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -553,12 +553,7 @@ void cpufreq_dbs_governor_limits(struct cpufreq_policy *policy) struct policy_dbs_info *policy_dbs = policy->governor_data; mutex_lock(&policy_dbs->timer_mutex); - - 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); gov_update_sample_delay(policy_dbs, 0); mutex_unlock(&policy_dbs->timer_mutex); |