Thermal/cpu_cooling: Return directly for the cpu out of allowed_cpus in the cpufreq_t...
authorLan Tianyu <tianyu.lan@intel.com>
Fri, 7 Feb 2014 10:44:02 +0000 (02:44 -0800)
committerDiwakar Tundlam <dtundlam@nvidia.com>
Thu, 13 Feb 2014 23:02:36 +0000 (15:02 -0800)
commitd8d828a1deb20372cfa41c4d4c9e9be4ac577416
treeabc5702711b4ab2d23fb32652698d3feaf098986
parent0945e62b45484784d1158e5332019d208315114c
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.

Change-Id: I88dd6d71f20a06e78b813520cd9082ad85321b30
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> # for the NVIDIA downstream kernel
Reviewed-on: http://git-master/r/356878
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
drivers/thermal/cpu_cooling.c