summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/exynos-cpufreq.c
diff options
context:
space:
mode:
authorJonghwan Choi <jhbird.choi@samsung.com>2012-12-23 15:57:39 -0800
committerKukjin Kim <kgene.kim@samsung.com>2012-12-23 15:57:39 -0800
commit857d90f7014f4fe0acc49947ad5309174111a4e8 (patch)
treef0840e14e18ae866c30f56f2cf852bc47341d677 /drivers/cpufreq/exynos-cpufreq.c
parent184cddd1e004d3ebd473f9e1ce20dec1d2576fd1 (diff)
downloadop-kernel-dev-857d90f7014f4fe0acc49947ad5309174111a4e8.zip
op-kernel-dev-857d90f7014f4fe0acc49947ad5309174111a4e8.tar.gz
cpufreq: exynos: Check old & new frequency early
If old & new freq have the same frequency, no need to call cpufreq notifier & regulator function. Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/cpufreq/exynos-cpufreq.c')
-rw-r--r--drivers/cpufreq/exynos-cpufreq.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 0e415e5..0d40eb7 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -87,6 +87,9 @@ static int exynos_target(struct cpufreq_policy *policy,
freqs.new = freq_table[index].frequency;
freqs.cpu = policy->cpu;
+ if (freqs.new == freqs.old)
+ goto out;
+
/*
* ARM clock source will be changed APLL to MPLL temporary
* To support this level, need to control regulator for
@@ -113,8 +116,8 @@ static int exynos_target(struct cpufreq_policy *policy,
if (safe_arm_volt)
regulator_set_voltage(arm_regulator, safe_arm_volt,
safe_arm_volt);
- if (freqs.new != freqs.old)
- exynos_info->set_freq(old_index, index);
+
+ exynos_info->set_freq(old_index, index);
for_each_cpu(freqs.cpu, policy->cpus)
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
OpenPOWER on IntegriCloud