aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 23a63207d747..815902c2c856 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -693,8 +693,8 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
693 unsigned int cpu = sys_dev->id; 693 unsigned int cpu = sys_dev->id;
694 unsigned long flags; 694 unsigned long flags;
695 struct cpufreq_policy *data; 695 struct cpufreq_policy *data;
696 struct sys_device *cpu_sys_dev;
697#ifdef CONFIG_SMP 696#ifdef CONFIG_SMP
697 struct sys_device *cpu_sys_dev;
698 unsigned int j; 698 unsigned int j;
699#endif 699#endif
700 700
@@ -1113,21 +1113,13 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
1113{ 1113{
1114 int retval = -EINVAL; 1114 int retval = -EINVAL;
1115 1115
1116 /* 1116 lock_cpu_hotplug();
1117 * If we are already in context of hotplug thread, we dont need to
1118 * acquire the hotplug lock. Otherwise acquire cpucontrol to prevent
1119 * hotplug from removing this cpu that we are working on.
1120 */
1121 if (!current_in_cpu_hotplug())
1122 lock_cpu_hotplug();
1123
1124 dprintk("target for CPU %u: %u kHz, relation %u\n", policy->cpu, 1117 dprintk("target for CPU %u: %u kHz, relation %u\n", policy->cpu,
1125 target_freq, relation); 1118 target_freq, relation);
1126 if (cpu_online(policy->cpu) && cpufreq_driver->target) 1119 if (cpu_online(policy->cpu) && cpufreq_driver->target)
1127 retval = cpufreq_driver->target(policy, target_freq, relation); 1120 retval = cpufreq_driver->target(policy, target_freq, relation);
1128 1121
1129 if (!current_in_cpu_hotplug()) 1122 unlock_cpu_hotplug();
1130 unlock_cpu_hotplug();
1131 1123
1132 return retval; 1124 return retval;
1133} 1125}