Messages in this thread Patch in this message | | | From | Alexander Beregalov <> | Subject | [PATCH] cpufreq: fix UP build | Date | Wed, 8 Jul 2009 21:57:47 +0400 |
| |
From: Alexander Beregalov <a.beregalov@gmail.com>
Fix this build error when CONFIG_SMP is not set: drivers/cpufreq/cpufreq.c:941: 'managed_policy' undeclared
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> ---
Tested on AthlonXP/NForce2
drivers/cpufreq/cpufreq.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index c668ac8..287872f 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -773,11 +773,11 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) struct cpufreq_policy new_policy; struct cpufreq_policy *policy; struct freq_attr **drv_attr; - struct sys_device *cpu_sys_dev; unsigned long flags; unsigned int j; #ifdef CONFIG_SMP struct cpufreq_policy *managed_policy; + struct sys_device *cpu_sys_dev; #endif if (cpu_is_offline(cpu)) @@ -930,6 +930,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) } spin_unlock_irqrestore(&cpufreq_driver_lock, flags); +#ifdef CONFIG_SMP /* symlink affected CPUs */ for_each_cpu(j, policy->cpus) { if (j == cpu) @@ -947,6 +948,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) goto err_out_unregister; } } +#endif policy->governor = NULL; /* to assure that the starting sequence is * run in cpufreq_set_policy */ -- 1.6.3.3
| |