提交 41dd6403 编写于 作者: S Srinivas Pandruvada 提交者: Rafael J. Wysocki

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: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 a6cbcdd5
...@@ -409,13 +409,13 @@ static int acpi_get_psd(struct cpc_desc *cpc_ptr, acpi_handle handle) ...@@ -409,13 +409,13 @@ static int acpi_get_psd(struct cpc_desc *cpc_ptr, acpi_handle handle)
* *
* Return: 0 for success or negative value for err. * Return: 0 for success or negative value for err.
*/ */
int acpi_get_psd_map(struct cpudata **all_cpu_data) int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data)
{ {
int count_target; int count_target;
int retval = 0; int retval = 0;
unsigned int i, j; unsigned int i, j;
cpumask_var_t covered_cpus; cpumask_var_t covered_cpus;
struct cpudata *pr, *match_pr; struct cppc_cpudata *pr, *match_pr;
struct acpi_psd_package *pdomain; struct acpi_psd_package *pdomain;
struct acpi_psd_package *match_pdomain; struct acpi_psd_package *match_pdomain;
struct cpc_desc *cpc_ptr, *match_cpc_ptr; struct cpc_desc *cpc_ptr, *match_cpc_ptr;
......
...@@ -30,13 +30,13 @@ ...@@ -30,13 +30,13 @@
* performance capabilities, desired performance level * performance capabilities, desired performance level
* requested etc. * requested etc.
*/ */
static struct cpudata **all_cpu_data; static struct cppc_cpudata **all_cpu_data;
static int cppc_cpufreq_set_target(struct cpufreq_policy *policy, static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int target_freq,
unsigned int relation) unsigned int relation)
{ {
struct cpudata *cpu; struct cppc_cpudata *cpu;
struct cpufreq_freqs freqs; struct cpufreq_freqs freqs;
int ret = 0; int ret = 0;
...@@ -66,7 +66,7 @@ static int cppc_verify_policy(struct cpufreq_policy *policy) ...@@ -66,7 +66,7 @@ static int cppc_verify_policy(struct cpufreq_policy *policy)
static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy) static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy)
{ {
int cpu_num = policy->cpu; int cpu_num = policy->cpu;
struct cpudata *cpu = all_cpu_data[cpu_num]; struct cppc_cpudata *cpu = all_cpu_data[cpu_num];
int ret; int ret;
cpu->perf_ctrls.desired_perf = cpu->perf_caps.lowest_perf; 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,7 +79,7 @@ static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy)
static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
{ {
struct cpudata *cpu; struct cppc_cpudata *cpu;
unsigned int cpu_num = policy->cpu; unsigned int cpu_num = policy->cpu;
int ret = 0; int ret = 0;
...@@ -135,7 +135,7 @@ static struct cpufreq_driver cppc_cpufreq_driver = { ...@@ -135,7 +135,7 @@ static struct cpufreq_driver cppc_cpufreq_driver = {
static int __init cppc_cpufreq_init(void) static int __init cppc_cpufreq_init(void)
{ {
int i, ret = 0; int i, ret = 0;
struct cpudata *cpu; struct cppc_cpudata *cpu;
if (acpi_disabled) if (acpi_disabled)
return -ENODEV; return -ENODEV;
...@@ -145,7 +145,7 @@ static int __init cppc_cpufreq_init(void) ...@@ -145,7 +145,7 @@ static int __init cppc_cpufreq_init(void)
return -ENOMEM; return -ENOMEM;
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
all_cpu_data[i] = kzalloc(sizeof(struct cpudata), GFP_KERNEL); all_cpu_data[i] = kzalloc(sizeof(struct cppc_cpudata), GFP_KERNEL);
if (!all_cpu_data[i]) if (!all_cpu_data[i])
goto out; goto out;
...@@ -176,7 +176,7 @@ static int __init cppc_cpufreq_init(void) ...@@ -176,7 +176,7 @@ static int __init cppc_cpufreq_init(void)
static void __exit cppc_cpufreq_exit(void) static void __exit cppc_cpufreq_exit(void)
{ {
struct cpudata *cpu; struct cppc_cpudata *cpu;
int i; int i;
cpufreq_unregister_driver(&cppc_cpufreq_driver); cpufreq_unregister_driver(&cppc_cpufreq_driver);
......
...@@ -119,7 +119,7 @@ struct cppc_perf_fb_ctrs { ...@@ -119,7 +119,7 @@ struct cppc_perf_fb_ctrs {
}; };
/* Per CPU container for runtime CPPC management. */ /* Per CPU container for runtime CPPC management. */
struct cpudata { struct cppc_cpudata {
int cpu; int cpu;
struct cppc_perf_caps perf_caps; struct cppc_perf_caps perf_caps;
struct cppc_perf_ctrls perf_ctrls; struct cppc_perf_ctrls perf_ctrls;
...@@ -132,7 +132,7 @@ struct cpudata { ...@@ -132,7 +132,7 @@ struct cpudata {
extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs); extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs);
extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls); extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps); extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
extern int acpi_get_psd_map(struct cpudata **); extern int acpi_get_psd_map(struct cppc_cpudata **);
extern unsigned int cppc_get_transition_latency(int cpu); extern unsigned int cppc_get_transition_latency(int cpu);
#endif /* _CPPC_ACPI_H*/ #endif /* _CPPC_ACPI_H*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册