aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_userspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq_userspace.c')
-rw-r--r--drivers/cpufreq/cpufreq_userspace.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c
index 03078090b5f7..4dbf1db16aca 100644
--- a/drivers/cpufreq/cpufreq_userspace.c
+++ b/drivers/cpufreq/cpufreq_userspace.c
@@ -38,18 +38,7 @@ static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq)
38 if (!per_cpu(cpu_is_managed, policy->cpu)) 38 if (!per_cpu(cpu_is_managed, policy->cpu))
39 goto err; 39 goto err;
40 40
41 /*
42 * We're safe from concurrent calls to ->target() here
43 * as we hold the userspace_mutex lock. If we were calling
44 * cpufreq_driver_target, a deadlock situation might occur:
45 * A: cpufreq_set (lock userspace_mutex) ->
46 * cpufreq_driver_target(lock policy->lock)
47 * B: cpufreq_set_policy(lock policy->lock) ->
48 * __cpufreq_governor ->
49 * cpufreq_governor_userspace (lock userspace_mutex)
50 */
51 ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L); 41 ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L);
52
53 err: 42 err:
54 mutex_unlock(&userspace_mutex); 43 mutex_unlock(&userspace_mutex);
55 return ret; 44 return ret;