From: Viresh Kumar Date: Thu, 12 Sep 2013 11:36:33 +0000 (+0530) Subject: cpufreq: Clear policy->cpus bits in __cpufreq_remove_dev_finish() X-Git-Tag: v3.12-rc2~7^2^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c8f1ee40b6368e6b2775c9c9f816e2a5dca3c07;p=pandora-kernel.git cpufreq: Clear policy->cpus bits in __cpufreq_remove_dev_finish() This broke after a recent change "cedb70a cpufreq: Split __cpufreq_remove_dev() into two parts" from Srivatsa. Consider a scenario where we have two CPUs in a policy (0 & 1) and we are removing CPU 1. On the call to __cpufreq_remove_dev_prepare() we have cleared 1 from policy->cpus and now on a call to __cpufreq_remove_dev_finish() we read cpumask_weight of policy->cpus, which will come as 1 and this code will behave as if we are removing the last CPU from policy :) Fix it by clearing the CPU mask in __cpufreq_remove_dev_finish() instead of __cpufreq_remove_dev_prepare(). Tested-by: Stephen Warren Reviewed-by: Srivatsa S. Bhat Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed