Commit accd8466 authored by Andrej Gelenberg's avatar Andrej Gelenberg Committed by Dave Jones

[CPUFREQ] revert "[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)"

395913d0 ("[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 default avatarAndrej Gelenberg <>
Cc: Mathieu Desnoyers <>
Cc: Venkatesh Pallipadi <>
Signed-off-by: default avatarAndrew Morton <>
Acked-by: default avatarMathieu Desnoyers <>
Signed-off-by: default avatarDave Jones <>
parent dbbe4649
......@@ -1762,17 +1762,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.
if (data->governor)
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
/* start new governor */
data->governor = policy->governor;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment