diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-01-28 23:40:00 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-01 18:01:16 -0500 |
commit | b26f72042e433642787e51fb3f40dbdd9969f6e1 (patch) | |
tree | 358fad67d8ca4590d6ea2d450eab4e37451db79a | |
parent | 74c46c6eaf9724edbfc12cc67e62773b708eb2ed (diff) |
cpufreq: Revert "cpufreq: Don't use cpu removed during cpufreq_driver_unregister"
This reverts commit 956f339 "cpufreq: Don't use cpu removed during
cpufreq_driver_unregister".
With the addition of the following commit, this change/variable is not
required any more:
commit b9ba2725343ae57add3f324dfa5074167f48de96
Author: Viresh Kumar <viresh.kumar@linaro.org>
Date: Mon Jan 14 13:23:03 2013 +0000
cpufreq: Simplify __cpufreq_remove_dev()
[rjw: Subject and changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 216c104d51ad..d474421d219b 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -47,9 +47,6 @@ static DEFINE_PER_CPU(char[CPUFREQ_NAME_LEN], cpufreq_cpu_governor); | |||
47 | #endif | 47 | #endif |
48 | static DEFINE_SPINLOCK(cpufreq_driver_lock); | 48 | static DEFINE_SPINLOCK(cpufreq_driver_lock); |
49 | 49 | ||
50 | /* Used when we unregister cpufreq driver */ | ||
51 | static struct cpumask cpufreq_online_mask; | ||
52 | |||
53 | /* | 50 | /* |
54 | * cpu_policy_rwsem is a per CPU reader-writer semaphore designed to cure | 51 | * cpu_policy_rwsem is a per CPU reader-writer semaphore designed to cure |
55 | * all cpufreq/hotplug/workqueue/etc related lock issues. | 52 | * all cpufreq/hotplug/workqueue/etc related lock issues. |
@@ -993,7 +990,6 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) | |||
993 | * managing offline cpus here. | 990 | * managing offline cpus here. |
994 | */ | 991 | */ |
995 | cpumask_and(policy->cpus, policy->cpus, cpu_online_mask); | 992 | cpumask_and(policy->cpus, policy->cpus, cpu_online_mask); |
996 | cpumask_and(policy->cpus, policy->cpus, &cpufreq_online_mask); | ||
997 | 993 | ||
998 | policy->user_policy.min = policy->min; | 994 | policy->user_policy.min = policy->min; |
999 | policy->user_policy.max = policy->max; | 995 | policy->user_policy.max = policy->max; |
@@ -1176,7 +1172,6 @@ static int cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) | |||
1176 | if (unlikely(lock_policy_rwsem_write(cpu))) | 1172 | if (unlikely(lock_policy_rwsem_write(cpu))) |
1177 | BUG(); | 1173 | BUG(); |
1178 | 1174 | ||
1179 | cpumask_clear_cpu(cpu, &cpufreq_online_mask); | ||
1180 | retval = __cpufreq_remove_dev(dev, sif); | 1175 | retval = __cpufreq_remove_dev(dev, sif); |
1181 | return retval; | 1176 | return retval; |
1182 | } | 1177 | } |
@@ -1918,8 +1913,6 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) | |||
1918 | cpufreq_driver = driver_data; | 1913 | cpufreq_driver = driver_data; |
1919 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); | 1914 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); |
1920 | 1915 | ||
1921 | cpumask_setall(&cpufreq_online_mask); | ||
1922 | |||
1923 | ret = subsys_interface_register(&cpufreq_interface); | 1916 | ret = subsys_interface_register(&cpufreq_interface); |
1924 | if (ret) | 1917 | if (ret) |
1925 | goto err_null_driver; | 1918 | goto err_null_driver; |