]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/cpufreq/cpufreq.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / drivers / cpufreq / cpufreq.c
index ee1df0d45e8189ca4eb92d4b1c2a352235b369db..8a67f16987db16582e87a49514cf3a99158d542e 100644 (file)
@@ -589,7 +589,7 @@ static ssize_t show_cpus(cpumask_t mask, char *buf)
        ssize_t i = 0;
        unsigned int cpu;
 
-       for_each_cpu_mask(cpu, mask) {
+       for_each_cpu_mask_nr(cpu, mask) {
                if (i)
                        i += scnprintf(&buf[i], (PAGE_SIZE - i - 2), " ");
                i += scnprintf(&buf[i], (PAGE_SIZE - i - 2), "%u", cpu);
@@ -825,6 +825,9 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
        policy->user_policy.min = policy->cpuinfo.min_freq;
        policy->user_policy.max = policy->cpuinfo.max_freq;
 
+       blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
+                                    CPUFREQ_START, policy);
+
 #ifdef CONFIG_SMP
 
 #ifdef CONFIG_HOTPLUG_CPU
@@ -835,7 +838,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
        }
 #endif
 
-       for_each_cpu_mask(j, policy->cpus) {
+       for_each_cpu_mask_nr(j, policy->cpus) {
                if (cpu == j)
                        continue;
 
@@ -898,14 +901,14 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
        }
 
        spin_lock_irqsave(&cpufreq_driver_lock, flags);
-       for_each_cpu_mask(j, policy->cpus) {
+       for_each_cpu_mask_nr(j, policy->cpus) {
                per_cpu(cpufreq_cpu_data, j) = policy;
                per_cpu(policy_cpu, j) = policy->cpu;
        }
        spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
        /* symlink affected CPUs */
-       for_each_cpu_mask(j, policy->cpus) {
+       for_each_cpu_mask_nr(j, policy->cpus) {
                if (j == cpu)
                        continue;
                if (!cpu_online(j))
@@ -945,7 +948,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
 
 err_out_unregister:
        spin_lock_irqsave(&cpufreq_driver_lock, flags);
-       for_each_cpu_mask(j, policy->cpus)
+       for_each_cpu_mask_nr(j, policy->cpus)
                per_cpu(cpufreq_cpu_data, j) = NULL;
        spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
@@ -1028,7 +1031,7 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
         * the sysfs links afterwards.
         */
        if (unlikely(cpus_weight(data->cpus) > 1)) {
-               for_each_cpu_mask(j, data->cpus) {
+               for_each_cpu_mask_nr(j, data->cpus) {
                        if (j == cpu)
                                continue;
                        per_cpu(cpufreq_cpu_data, j) = NULL;
@@ -1038,7 +1041,7 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
        spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
        if (unlikely(cpus_weight(data->cpus) > 1)) {
-               for_each_cpu_mask(j, data->cpus) {
+               for_each_cpu_mask_nr(j, data->cpus) {
                        if (j == cpu)
                                continue;
                        dprintk("removing link for cpu %u\n", j);