diff options
| author | Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> | 2016-05-03 11:19:36 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-05-10 20:28:00 -0400 |
| commit | 0bc10b93f2d9c6089ce968681ef9febecdc9b8e0 (patch) | |
| tree | 4622db802ca892474af6eeffc2bab9f8124fe044 /drivers/cpufreq | |
| parent | 1fd3ff2874f79c04354f3e80e583afbe6fa6eaa2 (diff) | |
cpufreq: powernv: del_timer_sync when global and local pstate are equal
When global and local pstate are equal in a powernv_target_index() call,
we don't queue a timer. But we may have timer already queued for future.
This could cause the timer to fire one additional time for no use.
Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
| -rw-r--r-- | drivers/cpufreq/powernv-cpufreq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 1f0e20ccc2ff..54c45368e3f1 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c | |||
| @@ -647,6 +647,8 @@ static int powernv_cpufreq_target_index(struct cpufreq_policy *policy, | |||
| 647 | */ | 647 | */ |
| 648 | if (gpstate_id != freq_data.pstate_id) | 648 | if (gpstate_id != freq_data.pstate_id) |
| 649 | queue_gpstate_timer(gpstates); | 649 | queue_gpstate_timer(gpstates); |
| 650 | else | ||
| 651 | del_timer_sync(&gpstates->timer); | ||
| 650 | 652 | ||
| 651 | gpstates_done: | 653 | gpstates_done: |
| 652 | freq_data.gpstate_id = gpstate_id; | 654 | freq_data.gpstate_id = gpstate_id; |
