From 07aa4402a009bc83194860e7869c491bab854d1c Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Mon, 15 Feb 2016 02:22:13 +0100 Subject: 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 Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq_governor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/cpufreq/cpufreq_governor.c') 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. */ -- cgit v1.2.3