Skip to content

Commit 41dd640

Browse files
spandruvadarafaeljw
authored andcommitted
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>
1 parent a6cbcdd commit 41dd640

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎drivers/acpi/cppc_acpi.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,13 +409,13 @@ static int acpi_get_psd(struct cpc_desc *cpc_ptr, acpi_handle handle)
409409
*
410410
* Return: 0 for success or negative value for err.
411411
*/
412-
int acpi_get_psd_map(struct cpudata **all_cpu_data)
412+
int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data)
413413
{
414414
int count_target;
415415
int retval = 0;
416416
unsigned int i, j;
417417
cpumask_var_t covered_cpus;
418-
struct cpudata *pr, *match_pr;
418+
struct cppc_cpudata *pr, *match_pr;
419419
struct acpi_psd_package *pdomain;
420420
struct acpi_psd_package *match_pdomain;
421421
struct cpc_desc *cpc_ptr, *match_cpc_ptr;

‎drivers/cpufreq/cppc_cpufreq.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
* performance capabilities, desired performance level
3131
* requested etc.
3232
*/
33-
static struct cpudata **all_cpu_data;
33+
static struct cppc_cpudata **all_cpu_data;
3434

3535
static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
3636
unsigned int target_freq,
3737
unsigned int relation)
3838
{
39-
struct cpudata *cpu;
39+
struct cppc_cpudata *cpu;
4040
struct cpufreq_freqs freqs;
4141
int ret = 0;
4242

@@ -66,7 +66,7 @@ static int cppc_verify_policy(struct cpufreq_policy *policy)
6666
static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy)
6767
{
6868
int cpu_num = policy->cpu;
69-
struct cpudata *cpu = all_cpu_data[cpu_num];
69+
struct cppc_cpudata *cpu = all_cpu_data[cpu_num];
7070
int ret;
7171

7272
cpu->perf_ctrls.desired_perf = cpu->perf_caps.lowest_perf;
@@ -79,7 +79,7 @@ static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy)
7979

8080
static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
8181
{
82-
struct cpudata *cpu;
82+
struct cppc_cpudata *cpu;
8383
unsigned int cpu_num = policy->cpu;
8484
int ret = 0;
8585

@@ -135,7 +135,7 @@ static struct cpufreq_driver cppc_cpufreq_driver = {
135135
static int __init cppc_cpufreq_init(void)
136136
{
137137
int i, ret = 0;
138-
struct cpudata *cpu;
138+
struct cppc_cpudata *cpu;
139139

140140
if (acpi_disabled)
141141
return -ENODEV;
@@ -145,7 +145,7 @@ static int __init cppc_cpufreq_init(void)
145145
return -ENOMEM;
146146

147147
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);
149149
if (!all_cpu_data[i])
150150
goto out;
151151

@@ -176,7 +176,7 @@ static int __init cppc_cpufreq_init(void)
176176

177177
static void __exit cppc_cpufreq_exit(void)
178178
{
179-
struct cpudata *cpu;
179+
struct cppc_cpudata *cpu;
180180
int i;
181181

182182
cpufreq_unregister_driver(&cppc_cpufreq_driver);

‎include/acpi/cppc_acpi.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ struct cppc_perf_fb_ctrs {
119119
};
120120

121121
/* Per CPU container for runtime CPPC management. */
122-
struct cpudata {
122+
struct cppc_cpudata {
123123
int cpu;
124124
struct cppc_perf_caps perf_caps;
125125
struct cppc_perf_ctrls perf_ctrls;
@@ -132,7 +132,7 @@ struct cpudata {
132132
extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs);
133133
extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
134134
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 **);
136136
extern unsigned int cppc_get_transition_latency(int cpu);
137137

138138
#endif /* _CPPC_ACPI_H*/

0 commit comments

Comments
 (0)