lkml.org 
[lkml]   [2015]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/6] thermal/cpu_cooling: quit early after updating policy
Date
If a valid cpufreq_dev is found for policy->cpu, we should update the
policy and quit the for loop. There is no need to keep traversing the
list of cpufreq_dev's.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/thermal/cpu_cooling.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index d010c6d0d722..276cec5a1fb7 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -232,6 +232,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
if (policy->max != max_freq)
cpufreq_verify_within_limits(policy, 0,
max_freq);
+ break;
}
mutex_unlock(&cooling_cpufreq_lock);
break;
--
2.4.0


\
 
 \ /
  Last update: 2015-07-30 18:21    [W:0.151 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site