summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cpufreq_governor.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-02-15 04:22:13 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-03-09 16:41:05 +0300
commit07aa4402a009bc83194860e7869c491bab854d1c (patch)
treebe3afab0505feb53ea9b67e5c9765a03b9852b36 /drivers/cpufreq/cpufreq_governor.c
parent6e96c5b3ac5181d4b787590e54c4af99d3fa5f2e (diff)
downloadlinux-07aa4402a009bc83194860e7869c491bab854d1c.tar.xz
cpufreq: governor: Use microseconds in sample delay computations
Do not convert microseconds to jiffies and the other way around in governor computations related to the sampling rate and sample delay and drop delay_for_sampling_rate() which isn't of any use then. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq_governor.c')
-rw-r--r--drivers/cpufreq/cpufreq_governor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index b002c0d626ea..56dba71d1788 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -282,7 +282,6 @@ static void dbs_work_handler(struct work_struct *work)
struct policy_dbs_info *policy_dbs;
struct cpufreq_policy *policy;
struct dbs_governor *gov;
- unsigned int delay;
policy_dbs = container_of(work, struct policy_dbs_info, work);
policy = policy_dbs->policy;
@@ -293,8 +292,7 @@ static void dbs_work_handler(struct work_struct *work)
* ondemand governor isn't updating the sampling rate in parallel.
*/
mutex_lock(&policy_dbs->timer_mutex);
- delay = gov->gov_dbs_timer(policy);
- policy_dbs->sample_delay_ns = jiffies_to_nsecs(delay);
+ gov_update_sample_delay(policy_dbs, gov->gov_dbs_timer(policy));
mutex_unlock(&policy_dbs->timer_mutex);
/* Allow the utilization update handler to queue up more work. */