diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1c0f62d0f938..815902c2c856 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -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 | } |