aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorAndrej Gelenberg <andrej.gelenberg@udo.edu>2010-05-14 18:15:58 -0400
committerDave Jones <davej@redhat.com>2010-08-03 13:47:01 -0400
commitffe6275f90cc2ea77e6120a510903687be067b16 (patch)
treec76971857ceb6ca4661beee6b4922278a93d91a4 /drivers/cpufreq
parentdbbe4649d683577de1063dbd9f6da7d4b8de2fed (diff)
[CPUFREQ] revert "[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)"
395913d0b1db37092ea3d9d69b832183b1dd84c5 ("[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)") is not needed, because there is no rwsem lock in cpufreq_ondemand and cpufreq_conservative anymore. Lock should not be released until the work done. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=1594 Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 063b2184caf..8f22ce1ea68 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1762,17 +1762,8 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data,
1762 dprintk("governor switch\n"); 1762 dprintk("governor switch\n");
1763 1763
1764 /* end old governor */ 1764 /* end old governor */
1765 if (data->governor) { 1765 if (data->governor)
1766 /*
1767 * Need to release the rwsem around governor
1768 * stop due to lock dependency between
1769 * cancel_delayed_work_sync and the read lock
1770 * taken in the delayed work handler.
1771 */
1772 unlock_policy_rwsem_write(data->cpu);
1773 __cpufreq_governor(data, CPUFREQ_GOV_STOP); 1766 __cpufreq_governor(data, CPUFREQ_GOV_STOP);
1774 lock_policy_rwsem_write(data->cpu);
1775 }
1776 1767
1777 /* start new governor */ 1768 /* start new governor */
1778 data->governor = policy->governor; 1769 data->governor = policy->governor;