Skip to content

Commit

Permalink
cpufreq: Revert "cpufreq: Don't use cpu removed during cpufreq_driver…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed Feb 1, 2013
1 parent 74c46c6 commit b26f720
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ static DEFINE_PER_CPU(char[CPUFREQ_NAME_LEN], cpufreq_cpu_governor);
#endif
static DEFINE_SPINLOCK(cpufreq_driver_lock);

/* Used when we unregister cpufreq driver */
static struct cpumask cpufreq_online_mask;

/*
* cpu_policy_rwsem is a per CPU reader-writer semaphore designed to cure
* all cpufreq/hotplug/workqueue/etc related lock issues.
Expand Down Expand Up @@ -993,7 +990,6 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
* managing offline cpus here.
*/
cpumask_and(policy->cpus, policy->cpus, cpu_online_mask);
cpumask_and(policy->cpus, policy->cpus, &cpufreq_online_mask);

policy->user_policy.min = policy->min;
policy->user_policy.max = policy->max;
Expand Down Expand Up @@ -1176,7 +1172,6 @@ static int cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
if (unlikely(lock_policy_rwsem_write(cpu)))
BUG();

cpumask_clear_cpu(cpu, &cpufreq_online_mask);
retval = __cpufreq_remove_dev(dev, sif);
return retval;
}
Expand Down Expand Up @@ -1918,8 +1913,6 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
cpufreq_driver = driver_data;
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);

cpumask_setall(&cpufreq_online_mask);

ret = subsys_interface_register(&cpufreq_interface);
if (ret)
goto err_null_driver;
Expand Down

0 comments on commit b26f720

Please sign in to comment.