mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 10:26:09 +00:00
ACPI: processor: thermal: avoid cpufreq_get_policy()
cpu_has_cpufreq() stores a 'struct cpufreq_policy' on the stack. Unfortunately, with debugging options enabled, the structure can be larger than 1024 bytes, which causes a compiler warning/error. (actually observed: 1184 bytes). Therefore: Switch to cpufreq_cpu_get(). Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
87ebbb8c61
commit
8120832d8f
@ -53,10 +53,17 @@ static int phys_package_first_cpu(int cpu)
|
||||
|
||||
static int cpu_has_cpufreq(unsigned int cpu)
|
||||
{
|
||||
struct cpufreq_policy policy;
|
||||
if (!acpi_processor_cpufreq_init || cpufreq_get_policy(&policy, cpu))
|
||||
struct cpufreq_policy *policy;
|
||||
|
||||
if (!acpi_processor_cpufreq_init)
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
policy = cpufreq_cpu_get(cpu);
|
||||
if (policy) {
|
||||
cpufreq_cpu_put(policy);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cpufreq_get_max_state(unsigned int cpu)
|
||||
|
Loading…
x
Reference in New Issue
Block a user