From c721d15a5cc1dade16f068123070c570378c5cc0 Mon Sep 17 00:00:00 2001 From: Amit Daniel Kachhap Date: Wed, 7 Aug 2013 16:46:11 +0530 Subject: cpufreq: exynos5440: Fix to skip when new frequency same as current This patch fixes the issue of un-necessary setting the clock controller when the new target frequency is same as the current one. This case usually occurs with governors like ondemand which passes the target frequency as the percentage of average frequency. This check is present in most of the cpufreq drivers. Cc: Viresh Kumar Cc: Rafael J. Wysocki Cc: Kukjin Kim Signed-off-by: Amit Daniel Kachhap Signed-off-by: Viresh Kumar --- drivers/cpufreq/exynos5440-cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/cpufreq') diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c index 0c74018eda47..d514c152fd1a 100644 --- a/drivers/cpufreq/exynos5440-cpufreq.c +++ b/drivers/cpufreq/exynos5440-cpufreq.c @@ -238,6 +238,9 @@ static int exynos_target(struct cpufreq_policy *policy, freqs.old = dvfs_info->cur_frequency; freqs.new = freq_table[index].frequency; + if (freqs.old == freqs.new) + goto out; + cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); /* Set the target frequency in all C0_3_PSTATE register */ -- cgit v1.2.3