summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2005-11-29 12:48:34 -0800
committerDave Jones <davej@redhat.com>2005-11-29 12:48:34 -0800
commitbe37bdbce7ceaacf4f20c6cc759efbe75ebd1196 (patch)
treef1a42fb5a4a17eea41d47d2c002fa303009f5523 /drivers/cpufreq
parent019a61b99338d0ac05de25317b85da88e7ec4b35 (diff)
parentd70aa5e4b54aa7e704c886838715ac8a45d5750f (diff)
Merge ../linus
Diffstat (limited to 'drivers/cpufreq')
-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)
unsigned int cpu = sys_dev->id;
unsigned long flags;
struct cpufreq_policy *data;
- struct sys_device *cpu_sys_dev;
#ifdef CONFIG_SMP
+ struct sys_device *cpu_sys_dev;
unsigned int j;
#endif
@@ -1113,21 +1113,13 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
{
int retval = -EINVAL;
- /*
- * If we are already in context of hotplug thread, we dont need to
- * acquire the hotplug lock. Otherwise acquire cpucontrol to prevent
- * hotplug from removing this cpu that we are working on.
- */
- if (!current_in_cpu_hotplug())
- lock_cpu_hotplug();
-
+ lock_cpu_hotplug();
dprintk("target for CPU %u: %u kHz, relation %u\n", policy->cpu,
target_freq, relation);
if (cpu_online(policy->cpu) && cpufreq_driver->target)
retval = cpufreq_driver->target(policy, target_freq, relation);
- if (!current_in_cpu_hotplug())
- unlock_cpu_hotplug();
+ unlock_cpu_hotplug();
return retval;
}