From: Akshay Adiga Date: Tue, 3 May 2016 15:19:36 +0000 (+0530) Subject: cpufreq: powernv: del_timer_sync when global and local pstate are equal X-Git-Tag: v4.7-rc2~10^2^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0bc10b93f2d9c6089ce968681ef9febecdc9b8e0;p=platform%2Fkernel%2Flinux-exynos.git 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 Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 1f0e20c..54c4536 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, */ if (gpstate_id != freq_data.pstate_id) queue_gpstate_timer(gpstates); + else + del_timer_sync(&gpstates->timer); gpstates_done: freq_data.gpstate_id = gpstate_id;