summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-07-26 15:35:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-07-26 15:35:53 -0700
commitee13cbdec4381b5bdb24683b5e7fcc29084c355d (patch)
tree8299560d24d1690702b75b7deba6d16b98a69bd0 /drivers
parent863da9557e5ad2874f3fc6f350b392e03f983ca4 (diff)
parent3581ced3b6ac289b5cd31663b34914a7347186a6 (diff)
downloadlinux-3.10-ee13cbdec4381b5bdb24683b5e7fcc29084c355d.tar.gz
linux-3.10-ee13cbdec4381b5bdb24683b5e7fcc29084c355d.tar.bz2
linux-3.10-ee13cbdec4381b5bdb24683b5e7fcc29084c355d.zip
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] powernow-k8: Limit Pstate transition latency check [CPUFREQ] Fix PCC driver error path [CPUFREQ] fix double freeing in error path of pcc-cpufreq [CPUFREQ] pcc driver should check for pcch method before calling _OSC [CPUFREQ] fix memory leak in cpufreq_add_dev [CPUFREQ] revert "[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpufreq.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 063b2184caf..938b74ea9ff 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1077,6 +1077,7 @@ err_out_unregister:
err_unlock_policy:
unlock_policy_rwsem_write(cpu);
+ free_cpumask_var(policy->related_cpus);
err_free_cpumask:
free_cpumask_var(policy->cpus);
err_free_policy:
@@ -1762,17 +1763,8 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data,
dprintk("governor switch\n");
/* end old governor */
- if (data->governor) {
- /*
- * Need to release the rwsem around governor
- * stop due to lock dependency between
- * cancel_delayed_work_sync and the read lock
- * taken in the delayed work handler.
- */
- unlock_policy_rwsem_write(data->cpu);
+ if (data->governor)
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
- lock_policy_rwsem_write(data->cpu);
- }
/* start new governor */
data->governor = policy->governor;