From bcff61562d9b89c23763e161404580cc190271b8 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 7 Oct 2003 18:48:38 +0100 Subject: [PATCH] [CPUFREQ] fix up the invalid usage of pol->policy in drv_init() also mark it with a warning in drv_verify() From Dominik. --- arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 8bd5559820f39..216d3901d48fd 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -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) -- 2.53.0