[CPUFREQ] Fix compile failure in cpufreq.c
authorDave Jones <davej@redhat.com>
Wed, 8 Jul 2009 20:14:23 +0000 (16:14 -0400)
committerDave Jones <davej@redhat.com>
Wed, 8 Jul 2009 23:04:23 +0000 (19:04 -0400)
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>
drivers/cpufreq/cpufreq.c

index c668ac855f71cf7793e05246b153ce308f9f415d..b90eda8b34409680863edb45bc7b993ed87a1082 100644 (file)
@@ -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))