diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1ba4039777e8..8d328186f774 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -423,6 +423,8 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy, | |||
423 | if (cpufreq_parse_governor(str_governor, &new_policy.policy, &new_policy.governor)) | 423 | if (cpufreq_parse_governor(str_governor, &new_policy.policy, &new_policy.governor)) |
424 | return -EINVAL; | 424 | return -EINVAL; |
425 | 425 | ||
426 | lock_cpu_hotplug(); | ||
427 | |||
426 | /* Do not use cpufreq_set_policy here or the user_policy.max | 428 | /* Do not use cpufreq_set_policy here or the user_policy.max |
427 | will be wrongly overridden */ | 429 | will be wrongly overridden */ |
428 | mutex_lock(&policy->lock); | 430 | mutex_lock(&policy->lock); |
@@ -432,6 +434,8 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy, | |||
432 | policy->user_policy.governor = policy->governor; | 434 | policy->user_policy.governor = policy->governor; |
433 | mutex_unlock(&policy->lock); | 435 | mutex_unlock(&policy->lock); |
434 | 436 | ||
437 | unlock_cpu_hotplug(); | ||
438 | |||
435 | return ret ? ret : count; | 439 | return ret ? ret : count; |
436 | } | 440 | } |
437 | 441 | ||