qcom-cpufreq: Rename cpufreq_suspend to suspend_data

cpufreq_suspend is now a function in core CPUfreq framework. Rename
qcom-cpufreq's local per-cpu variable to suspend_data.

Change-Id: I2f567f0c04271d728d4e6a17b61cea2152c4d8f7
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
This commit is contained in:
Junjie Wu 2015-04-13 17:30:13 -07:00 committed by David Keitel
parent 16d6aa6ee5
commit 14d4d12ad6

View file

@ -41,7 +41,7 @@ struct cpufreq_suspend_t {
int device_suspended; int device_suspended;
}; };
static DEFINE_PER_CPU(struct cpufreq_suspend_t, cpufreq_suspend); static DEFINE_PER_CPU(struct cpufreq_suspend_t, suspend_data);
static int set_cpu_freq(struct cpufreq_policy *policy, unsigned int new_freq, static int set_cpu_freq(struct cpufreq_policy *policy, unsigned int new_freq,
unsigned int index) unsigned int index)
@ -77,9 +77,9 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
int index; int index;
struct cpufreq_frequency_table *table; struct cpufreq_frequency_table *table;
mutex_lock(&per_cpu(cpufreq_suspend, policy->cpu).suspend_mutex); mutex_lock(&per_cpu(suspend_data, policy->cpu).suspend_mutex);
if (per_cpu(cpufreq_suspend, policy->cpu).device_suspended) { if (per_cpu(suspend_data, policy->cpu).device_suspended) {
pr_debug("cpufreq: cpu%d scheduling frequency change " pr_debug("cpufreq: cpu%d scheduling frequency change "
"in suspend.\n", policy->cpu); "in suspend.\n", policy->cpu);
ret = -EFAULT; ret = -EFAULT;
@ -101,7 +101,7 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
ret = set_cpu_freq(policy, table[index].frequency, ret = set_cpu_freq(policy, table[index].frequency,
table[index].driver_data); table[index].driver_data);
done: done:
mutex_unlock(&per_cpu(cpufreq_suspend, policy->cpu).suspend_mutex); mutex_unlock(&per_cpu(suspend_data, policy->cpu).suspend_mutex);
return ret; return ret;
} }
@ -231,9 +231,9 @@ static int msm_cpufreq_suspend(void)
int cpu; int cpu;
for_each_possible_cpu(cpu) { for_each_possible_cpu(cpu) {
mutex_lock(&per_cpu(cpufreq_suspend, cpu).suspend_mutex); mutex_lock(&per_cpu(suspend_data, cpu).suspend_mutex);
per_cpu(cpufreq_suspend, cpu).device_suspended = 1; per_cpu(suspend_data, cpu).device_suspended = 1;
mutex_unlock(&per_cpu(cpufreq_suspend, cpu).suspend_mutex); mutex_unlock(&per_cpu(suspend_data, cpu).suspend_mutex);
} }
return NOTIFY_DONE; return NOTIFY_DONE;
@ -245,7 +245,7 @@ static int msm_cpufreq_resume(void)
struct cpufreq_policy policy; struct cpufreq_policy policy;
for_each_possible_cpu(cpu) { for_each_possible_cpu(cpu) {
per_cpu(cpufreq_suspend, cpu).device_suspended = 0; per_cpu(suspend_data, cpu).device_suspended = 0;
} }
/* /*
@ -465,8 +465,8 @@ static int __init msm_cpufreq_register(void)
int cpu, rc; int cpu, rc;
for_each_possible_cpu(cpu) { for_each_possible_cpu(cpu) {
mutex_init(&(per_cpu(cpufreq_suspend, cpu).suspend_mutex)); mutex_init(&(per_cpu(suspend_data, cpu).suspend_mutex));
per_cpu(cpufreq_suspend, cpu).device_suspended = 0; per_cpu(suspend_data, cpu).device_suspended = 0;
} }
rc = platform_driver_probe(&msm_cpufreq_plat_driver, rc = platform_driver_probe(&msm_cpufreq_plat_driver,
@ -475,7 +475,7 @@ static int __init msm_cpufreq_register(void)
/* Unblock hotplug if msm-cpufreq probe fails */ /* Unblock hotplug if msm-cpufreq probe fails */
unregister_hotcpu_notifier(&msm_cpufreq_cpu_notifier); unregister_hotcpu_notifier(&msm_cpufreq_cpu_notifier);
for_each_possible_cpu(cpu) for_each_possible_cpu(cpu)
mutex_destroy(&(per_cpu(cpufreq_suspend, cpu). mutex_destroy(&(per_cpu(suspend_data, cpu).
suspend_mutex)); suspend_mutex));
return rc; return rc;
} }