]> git.hungrycats.org Git - linux/commitdiff
[CPUFREQ] fix up the invalid usage of pol->policy in drv_init()
authorDave Jones <davej@redhat.com>
Tue, 7 Oct 2003 17:48:38 +0000 (18:48 +0100)
committerDave Jones <davej@redhat.com>
Tue, 7 Oct 2003 17:48:38 +0000 (18:48 +0100)
also mark it with a warning in drv_verify()
From Dominik.

arch/i386/kernel/cpu/cpufreq/powernow-k8.c

index 8bd5559820f39b424eee63f668c051c4f7859c91..216d3901d48fdc7010cdd843296129b52e978cf7 100644 (file)
@@ -935,6 +935,7 @@ drv_verify(struct cpufreq_policy *pol)
                return -ENODEV;
        }
 
+#warning pol->policy is in undefined state here
        res = find_match(&targ, &min, &max,
                         pol->policy == CPUFREQ_POLICY_POWERSAVE ?
                         SEARCH_DOWN : SEARCH_UP, 0, 0);
@@ -954,7 +955,7 @@ drv_cpu_init(struct cpufreq_policy *pol)
                return -ENODEV;
        }
 
-       pol->policy = CPUFREQ_POLICY_PERFORMANCE; /* boot as fast as we can */
+       pol->policy = CPUFREQ_DEFAULT_GOVERNOR;
 
        /* Take a crude guess here. */
        pol->cpuinfo.transition_latency = ((rvo + 8) * vstable * VST_UNITS_20US)