diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2016-09-01 16:37:11 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-09-08 17:02:15 -0400 |
commit | 41dd64038970139c562d07ee7ff4e41245611b4a (patch) | |
tree | 2db200c7f4ba9ee57d21a9231d35813812add157 | |
parent | a6cbcdd5ab5f242d49f511127f0a601b71be2cc4 (diff) |
ACPI / CPPC: Add prefix cppc to cpudata structure name
Since struct cpudata is defined in a header file, add prefix cppc_ to
make it not a generic name. Otherwise it causes compile issue in locally
define structure with the same name.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/cppc_acpi.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/cppc_cpufreq.c | 14 | ||||
-rw-r--r-- | include/acpi/cppc_acpi.h | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 715fe8001d59..3d1ae6d37178 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c | |||
@@ -409,13 +409,13 @@ end: | |||
409 | * | 409 | * |
410 | * Return: 0 for success or negative value for err. | 410 | * Return: 0 for success or negative value for err. |
411 | */ | 411 | */ |
412 | int acpi_get_psd_map(struct cpudata **all_cpu_data) | 412 | int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data) |
413 | { | 413 | { |
414 | int count_target; | 414 | int count_target; |
415 | int retval = 0; | 415 | int retval = 0; |
416 | unsigned int i, j; | 416 | unsigned int i, j; |
417 | cpumask_var_t covered_cpus; | 417 | cpumask_var_t covered_cpus; |
418 | struct cpudata *pr, *match_pr; | 418 | struct cppc_cpudata *pr, *match_pr; |
419 | struct acpi_psd_package *pdomain; | 419 | struct acpi_psd_package *pdomain; |
420 | struct acpi_psd_package *match_pdomain; | 420 | struct acpi_psd_package *match_pdomain; |
421 | struct cpc_desc *cpc_ptr, *match_cpc_ptr; | 421 | struct cpc_desc *cpc_ptr, *match_cpc_ptr; |
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index e6a33596dea3..6588ec567d93 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c | |||
@@ -30,13 +30,13 @@ | |||
30 | * performance capabilities, desired performance level | 30 | * performance capabilities, desired performance level |
31 | * requested etc. | 31 | * requested etc. |
32 | */ | 32 | */ |
33 | static struct cpudata **all_cpu_data; | 33 | static struct cppc_cpudata **all_cpu_data; |
34 | 34 | ||
35 | static int cppc_cpufreq_set_target(struct cpufreq_policy *policy, | 35 | static int cppc_cpufreq_set_target(struct cpufreq_policy *policy, |
36 | unsigned int target_freq, | 36 | unsigned int target_freq, |
37 | unsigned int relation) | 37 | unsigned int relation) |
38 | { | 38 | { |
39 | struct cpudata *cpu; | 39 | struct cppc_cpudata *cpu; |
40 | struct cpufreq_freqs freqs; | 40 | struct cpufreq_freqs freqs; |
41 | int ret = 0; | 41 | int ret = 0; |
42 | 42 | ||
@@ -66,7 +66,7 @@ static int cppc_verify_policy(struct cpufreq_policy *policy) | |||
66 | static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy) | 66 | static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy) |
67 | { | 67 | { |
68 | int cpu_num = policy->cpu; | 68 | int cpu_num = policy->cpu; |
69 | struct cpudata *cpu = all_cpu_data[cpu_num]; | 69 | struct cppc_cpudata *cpu = all_cpu_data[cpu_num]; |
70 | int ret; | 70 | int ret; |
71 | 71 | ||
72 | cpu->perf_ctrls.desired_perf = cpu->perf_caps.lowest_perf; | 72 | cpu->perf_ctrls.desired_perf = cpu->perf_caps.lowest_perf; |
@@ -79,7 +79,7 @@ static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy) | |||
79 | 79 | ||
80 | static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) | 80 | static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) |
81 | { | 81 | { |
82 | struct cpudata *cpu; | 82 | struct cppc_cpudata *cpu; |
83 | unsigned int cpu_num = policy->cpu; | 83 | unsigned int cpu_num = policy->cpu; |
84 | int ret = 0; | 84 | int ret = 0; |
85 | 85 | ||
@@ -135,7 +135,7 @@ static struct cpufreq_driver cppc_cpufreq_driver = { | |||
135 | static int __init cppc_cpufreq_init(void) | 135 | static int __init cppc_cpufreq_init(void) |
136 | { | 136 | { |
137 | int i, ret = 0; | 137 | int i, ret = 0; |
138 | struct cpudata *cpu; | 138 | struct cppc_cpudata *cpu; |
139 | 139 | ||
140 | if (acpi_disabled) | 140 | if (acpi_disabled) |
141 | return -ENODEV; | 141 | return -ENODEV; |
@@ -145,7 +145,7 @@ static int __init cppc_cpufreq_init(void) | |||
145 | return -ENOMEM; | 145 | return -ENOMEM; |
146 | 146 | ||
147 | for_each_possible_cpu(i) { | 147 | for_each_possible_cpu(i) { |
148 | all_cpu_data[i] = kzalloc(sizeof(struct cpudata), GFP_KERNEL); | 148 | all_cpu_data[i] = kzalloc(sizeof(struct cppc_cpudata), GFP_KERNEL); |
149 | if (!all_cpu_data[i]) | 149 | if (!all_cpu_data[i]) |
150 | goto out; | 150 | goto out; |
151 | 151 | ||
@@ -176,7 +176,7 @@ out: | |||
176 | 176 | ||
177 | static void __exit cppc_cpufreq_exit(void) | 177 | static void __exit cppc_cpufreq_exit(void) |
178 | { | 178 | { |
179 | struct cpudata *cpu; | 179 | struct cppc_cpudata *cpu; |
180 | int i; | 180 | int i; |
181 | 181 | ||
182 | cpufreq_unregister_driver(&cppc_cpufreq_driver); | 182 | cpufreq_unregister_driver(&cppc_cpufreq_driver); |
diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h index 0e83cc3009bc..427a7c3e6c75 100644 --- a/include/acpi/cppc_acpi.h +++ b/include/acpi/cppc_acpi.h | |||
@@ -119,7 +119,7 @@ struct cppc_perf_fb_ctrs { | |||
119 | }; | 119 | }; |
120 | 120 | ||
121 | /* Per CPU container for runtime CPPC management. */ | 121 | /* Per CPU container for runtime CPPC management. */ |
122 | struct cpudata { | 122 | struct cppc_cpudata { |
123 | int cpu; | 123 | int cpu; |
124 | struct cppc_perf_caps perf_caps; | 124 | struct cppc_perf_caps perf_caps; |
125 | struct cppc_perf_ctrls perf_ctrls; | 125 | struct cppc_perf_ctrls perf_ctrls; |
@@ -132,7 +132,7 @@ struct cpudata { | |||
132 | extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs); | 132 | extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs); |
133 | extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls); | 133 | extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls); |
134 | extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps); | 134 | extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps); |
135 | extern int acpi_get_psd_map(struct cpudata **); | 135 | extern int acpi_get_psd_map(struct cppc_cpudata **); |
136 | extern unsigned int cppc_get_transition_latency(int cpu); | 136 | extern unsigned int cppc_get_transition_latency(int cpu); |
137 | 137 | ||
138 | #endif /* _CPPC_ACPI_H*/ | 138 | #endif /* _CPPC_ACPI_H*/ |