Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16553b77 authored by Junjie Wu's avatar Junjie Wu Committed by Matt Wagantall
Browse files

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: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 114c75db
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ struct cpufreq_suspend_t {
	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,
			unsigned int index)
@@ -77,9 +77,9 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
	int index;
	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 "
				"in suspend.\n", policy->cpu);
		ret = -EFAULT;
@@ -101,7 +101,7 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
	ret = set_cpu_freq(policy, table[index].frequency,
			   table[index].driver_data);
done:
	mutex_unlock(&per_cpu(cpufreq_suspend, policy->cpu).suspend_mutex);
	mutex_unlock(&per_cpu(suspend_data, policy->cpu).suspend_mutex);
	return ret;
}

@@ -231,9 +231,9 @@ static int msm_cpufreq_suspend(void)
	int cpu;

	for_each_possible_cpu(cpu) {
		mutex_lock(&per_cpu(cpufreq_suspend, cpu).suspend_mutex);
		per_cpu(cpufreq_suspend, cpu).device_suspended = 1;
		mutex_unlock(&per_cpu(cpufreq_suspend, cpu).suspend_mutex);
		mutex_lock(&per_cpu(suspend_data, cpu).suspend_mutex);
		per_cpu(suspend_data, cpu).device_suspended = 1;
		mutex_unlock(&per_cpu(suspend_data, cpu).suspend_mutex);
	}

	return NOTIFY_DONE;
@@ -245,7 +245,7 @@ static int msm_cpufreq_resume(void)
	struct cpufreq_policy policy;

	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;

	for_each_possible_cpu(cpu) {
		mutex_init(&(per_cpu(cpufreq_suspend, cpu).suspend_mutex));
		per_cpu(cpufreq_suspend, cpu).device_suspended = 0;
		mutex_init(&(per_cpu(suspend_data, cpu).suspend_mutex));
		per_cpu(suspend_data, cpu).device_suspended = 0;
	}

	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 */
		unregister_hotcpu_notifier(&msm_cpufreq_cpu_notifier);
		for_each_possible_cpu(cpu)
			mutex_destroy(&(per_cpu(cpufreq_suspend, cpu).
			mutex_destroy(&(per_cpu(suspend_data, cpu).
					suspend_mutex));
		return rc;
	}