]> git.hungrycats.org Git - linux/commitdiff
[CPUFREQ] Quieten the powernow-k7 init printk a little.
authorDave Jones <davej@redhat.com>
Mon, 24 May 2004 22:20:35 +0000 (23:20 +0100)
committerDave Jones <davej@delerium.codemonkey.org.uk>
Mon, 24 May 2004 22:20:35 +0000 (23:20 +0100)
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

index d67f776d3afe7fcf9e5ac73f4a0f4ad9613b9d25..55bc794951b30c1744fcf349d1b4da361898bbb2 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <linux/config.h>
 #include <linux/kernel.h>
-#include <linux/module.h> 
+#include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/cpufreq.h>
@@ -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;
 }