Skip to content

Commit a3f083e

Browse files
zhengbin13rafaeljw
authored andcommitted
cpufreq: CPPC: Fix build error without CONFIG_ACPI_CPPC_CPUFREQ_FIE
If CONFIG_ACPI_CPPC_CPUFREQ_FIE is not set, building fails: drivers/cpufreq/cppc_cpufreq.c: In function ‘populate_efficiency_class’: drivers/cpufreq/cppc_cpufreq.c:584:2: error: ‘cppc_cpufreq_driver’ undeclared (first use in this function); did you mean ‘cpufreq_driver’? cppc_cpufreq_driver.register_em = cppc_cpufreq_register_em; ^~~~~~~~~~~~~~~~~~~ cpufreq_driver Make declare of cppc_cpufreq_driver out of CONFIG_ACPI_CPPC_CPUFREQ_FIE to fix this. Fixes: 740fcdc ("cpufreq: CPPC: Register EM based on efficiency class information") Signed-off-by: Zheng Bin <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 990247a commit a3f083e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/cpufreq/cppc_cpufreq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ static struct cppc_workaround_oem_info wa_info[] = {
6161
}
6262
};
6363

64+
static struct cpufreq_driver cppc_cpufreq_driver;
65+
6466
#ifdef CONFIG_ACPI_CPPC_CPUFREQ_FIE
6567

6668
/* Frequency invariance support */
@@ -75,7 +77,6 @@ struct cppc_freq_invariance {
7577
static DEFINE_PER_CPU(struct cppc_freq_invariance, cppc_freq_inv);
7678
static struct kthread_worker *kworker_fie;
7779

78-
static struct cpufreq_driver cppc_cpufreq_driver;
7980
static unsigned int hisi_cppc_cpufreq_get_rate(unsigned int cpu);
8081
static int cppc_perf_from_fbctrs(struct cppc_cpudata *cpu_data,
8182
struct cppc_perf_fb_ctrs *fb_ctrs_t0,

0 commit comments

Comments
 (0)