Thermal/cpu_cooling: Return directly for the cpu out of allowed_cpus in the cpufreq_t...
authorLan Tianyu <tianyu.lan@intel.com>
Tue, 13 Aug 2013 02:07:28 +0000 (10:07 +0800)
committerAlex Shi <alex.shi@linaro.org>
Thu, 25 Sep 2014 09:12:06 +0000 (17:12 +0800)
commitfca2d1a60af983180816385fc8238ce818cb72c3
tree76845216f430c04d338b9a2ca9922d1e10ed9a39
parentf8b3519d0a85467970e662f75d1c12d39563c2de
Thermal/cpu_cooling: Return directly for the cpu out of allowed_cpus in the cpufreq_thermal_notifier()

cpufreq_thermal_notifier() is to change the cpu's cpufreq in the allowed_cpus mask
when associated thermal-cpufreq cdev's cooling state is changed. It's a cpufreq policy
notifier handler and it will be triggered even if those cpus out of allowed_cpus has
changed freq policy.

cpufreq_thermal_notifier() checks the policy->cpu. If it belongs to allowed_cpus,
change max_freq(default to 0) to the desire cpufreq value and pass 0 and max_freq
to cpufreq_verify_within_limits() as cpufreq scope. But if not, do nothing and
max_freq will remain 0. This will cause the cpufreq scope to become 0~0. This
is not right. This patch is to return directly after finding cpu not belonging
to allowed_cpus.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
(cherry picked from commit 044d5c26da262fa433dacbe1c6962459050d6b06)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
drivers/thermal/cpu_cooling.c