summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/cpu_cooling.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-07-30 09:10:31 +0200
committerEduardo Valentin <edubezval@gmail.com>2015-08-15 03:26:22 +0200
commit166529c9b6f91b97d771e2e7ebf748aadb239b44 (patch)
treedfea5c8d883bc4697999a80462ad6181c202918c /drivers/thermal/cpu_cooling.c
parentthermal/cpu_cooling: No need to initialize max_freq to 0 (diff)
downloadlinux-166529c9b6f91b97d771e2e7ebf748aadb239b44.tar.xz
linux-166529c9b6f91b97d771e2e7ebf748aadb239b44.zip
thermal/cpu_cooling: quit early after updating policy
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> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/cpu_cooling.c')
-rw-r--r--drivers/thermal/cpu_cooling.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index c7572dfc927a..093537f00db3 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -235,6 +235,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_list_lock);
break;