aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-07-17 01:18:26 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-21 07:43:20 -0400
commit1461dc7d1c252fbeb5baee0c94b5b28b7966e125 (patch)
tree6cebe16bcc9ba463ee8c880c2915c6346a72008a /drivers/cpufreq/cpufreq.c
parent853aa05aad49125d28ffbd4faf49a0db779f0f8a (diff)
cpufreq: don't restore policy->cpus on failure to move kobj
While hot-unplugging policy->cpu, we call cpufreq_nominate_new_policy_cpu() to nominate next owner of policy, i.e. policy->cpu. If we fail to move policy kobject under the new policy->cpu, we try to update policy->cpus with the old policy->cpu. This would have been required in case old-CPU is removed from policy->cpus in the first place. But its not done before calling cpufreq_nominate_new_policy_cpu(), but during the POST_DEAD notification which happens quite late in the hot-unplugging path. So, this is just some useless code hanging around, get rid of it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6f024852c6fb..e572d51db945 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1322,11 +1322,6 @@ static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *policy,
1322 ret = kobject_move(&policy->kobj, &cpu_dev->kobj); 1322 ret = kobject_move(&policy->kobj, &cpu_dev->kobj);
1323 if (ret) { 1323 if (ret) {
1324 pr_err("%s: Failed to move kobj: %d\n", __func__, ret); 1324 pr_err("%s: Failed to move kobj: %d\n", __func__, ret);
1325
1326 down_write(&policy->rwsem);
1327 cpumask_set_cpu(old_cpu, policy->cpus);
1328 up_write(&policy->rwsem);
1329
1330 ret = sysfs_create_link(&cpu_dev->kobj, &policy->kobj, 1325 ret = sysfs_create_link(&cpu_dev->kobj, &policy->kobj,
1331 "cpufreq"); 1326 "cpufreq");
1332 1327