DivestOS/Patches/LineageOS-14.1/android_kernel_lge_mako/0005-Overclock.patch
2018-01-11 15:58:04 -05:00

26 lines
882 B
Diff

From 0753d75eadea50214530dd5f3efcfa9169a5bd18 Mon Sep 17 00:00:00 2001
From: Stratos Karafotis <stratosk@semaphore.gr>
Date: Sat, 1 Jun 2013 23:59:40 +0300
Subject: [PATCH] msm: cpufreq: Break out early if target frequency is the same
as the current
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
---
arch/arm/mach-msm/cpufreq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-msm/cpufreq.c b/arch/arm/mach-msm/cpufreq.c
index d968075548e..ad56ed54ec7 100644
--- a/arch/arm/mach-msm/cpufreq.c
+++ b/arch/arm/mach-msm/cpufreq.c
@@ -241,6 +241,9 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
goto done;
}
+ if (table[index].frequency == policy->cur)
+ goto done;
+
pr_debug("CPU[%d] target %d relation %d (%d-%d) selected %d\n",
policy->cpu, target_freq, relation,
policy->min, policy->max, table[index].frequency);