@@ -102,7 +102,7 @@ static LIST_HEAD(cpufreq_governor_list);
static struct cpufreq_driver *cpufreq_driver;
static DEFINE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_data);
static DEFINE_RWLOCK(cpufreq_driver_lock);
-static DEFINE_MUTEX(cpufreq_governor_lock);
+static DEFINE_MUTEX(cpufreq_governor_mutex);
/* Flag to suspend/resume CPUFreq governors */
static bool cpufreq_suspended;
@@ -146,7 +146,6 @@ void disable_cpufreq(void)
{
off = 1;
}
-static DEFINE_MUTEX(cpufreq_governor_mutex);
bool have_governor_per_policy(void)
{
@@ -1963,11 +1962,11 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
pr_debug("%s: for CPU %u, event %u\n", __func__, policy->cpu, event);
- mutex_lock(&cpufreq_governor_lock);
+ mutex_lock(&cpufreq_governor_mutex);
if ((policy->governor_enabled && event == CPUFREQ_GOV_START)
|| (!policy->governor_enabled
&& (event == CPUFREQ_GOV_LIMITS || event == CPUFREQ_GOV_STOP))) {
- mutex_unlock(&cpufreq_governor_lock);
+ mutex_unlock(&cpufreq_governor_mutex);
return -EBUSY;
}
@@ -1976,7 +1975,7 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
else if (event == CPUFREQ_GOV_START)
policy->governor_enabled = true;
- mutex_unlock(&cpufreq_governor_lock);
+ mutex_unlock(&cpufreq_governor_mutex);
ret = policy->governor->governor(policy, event);
@@ -1987,12 +1986,12 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
policy->governor->initialized--;
} else {
/* Restore original values */
- mutex_lock(&cpufreq_governor_lock);
+ mutex_lock(&cpufreq_governor_mutex);
if (event == CPUFREQ_GOV_STOP)
policy->governor_enabled = true;
else if (event == CPUFREQ_GOV_START)
policy->governor_enabled = false;
- mutex_unlock(&cpufreq_governor_lock);
+ mutex_unlock(&cpufreq_governor_mutex);
}
if (((event == CPUFREQ_GOV_POLICY_INIT) && ret) ||