diff options
author | Dave Jones <davej@redhat.com> | 2009-07-08 20:14:23 (GMT) |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-07-08 23:04:23 (GMT) |
commit | 5e1596f75395e7a402e1059c518e633d2732dcf8 (patch) | |
tree | 38125e71bb4f67c4ad9693a638f507b249a4ded1 /drivers/cpufreq/cpufreq.c | |
parent | 44b572809581d5a10dbe35aa6bf689f32b9c5ad6 (diff) | |
download | linux-5e1596f75395e7a402e1059c518e633d2732dcf8.tar.xz |
[CPUFREQ] Fix compile failure in cpufreq.c
managed_policy is out of scope for the non-smp case.
Declare it locally where used (twice)
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index c668ac8..b90eda8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -776,9 +776,6 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) struct sys_device *cpu_sys_dev; unsigned long flags; unsigned int j; -#ifdef CONFIG_SMP - struct cpufreq_policy *managed_policy; -#endif if (cpu_is_offline(cpu)) return 0; @@ -854,6 +851,8 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) #endif for_each_cpu(j, policy->cpus) { + struct cpufreq_policy *managed_policy; + if (cpu == j) continue; @@ -932,6 +931,8 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) /* symlink affected CPUs */ for_each_cpu(j, policy->cpus) { + struct cpufreq_policy *managed_policy; + if (j == cpu) continue; if (!cpu_online(j)) |