From 3c892fff03afaa42c6215bf6f2a480ae42d51aac Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Mon, 24 May 2004 23:20:35 +0100 Subject: [PATCH] [CPUFREQ] Quieten the powernow-k7 init printk a little. There seem to be quite a few desktop K7 processors which support the powernow cpuid call, but don't actually offer any powernow scaling. In which case the driver prints out "PowerNOW! Technology present. Can scale: nothing" which looks a bit odd, and just adds to confusion of end-users. Change things so that we don't print anything at all if we can't do anything. Also kill some trailing whitespace gremlins that crept in. --- arch/i386/kernel/cpu/cpufreq/powernow-k7.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c index d67f776d3afe7..55bc794951b30 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -86,7 +86,7 @@ static int mobile_vid_table[32] = { /* divide by 10 to get FID. */ static int fid_codes[32] = { 110, 115, 120, 125, 50, 55, 60, 65, - 70, 75, 80, 85, 90, 95, 100, 105, + 70, 75, 80, 85, 90, 95, 100, 105, 30, 190, 40, 200, 130, 135, 140, 210, 150, 225, 160, 165, 170, 180, -1, -1, }; @@ -144,6 +144,11 @@ static int check_powernow(void) } cpuid(0x80000007, &eax, &ebx, &ecx, &edx); + + /* Check we can actually do something before we say anything.*/ + if (!(edx & (1 << 1 | 1 << 2))) + return 0; + printk (KERN_INFO PFX "PowerNOW! Technology present. Can scale: "); if (edx & 1 << 1) { @@ -159,11 +164,6 @@ static int check_powernow(void) can_scale_vid=1; } - if (!(edx & (1 << 1 | 1 << 2))) { - printk ("nothing.\n"); - return 0; - } - printk (".\n"); return 1; } -- 2.53.0