summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_governor.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-02-15 02:22:13 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-03-09 14:41:05 +0100
commit07aa4402a009bc83194860e7869c491bab854d1c (patch)
treebe3afab0505feb53ea9b67e5c9765a03b9852b36 /drivers/cpufreq/cpufreq_governor.c
parentcpufreq: ondemand: Simplify conditionals in od_dbs_timer() (diff)
downloadlinux-07aa4402a009bc83194860e7869c491bab854d1c.tar.xz
linux-07aa4402a009bc83194860e7869c491bab854d1c.zip
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. */