]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
hwmon: (it87) Fix VID reading on IT8718F/IT8720F
authorJean Delvare <khali@linux-fr.org>
Sat, 24 Oct 2009 11:28:47 +0000 (13:28 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:22:59 +0000 (16:22 -0800)
commit 371dc4a6d8c3c74a9a1c74b87c2affb3fcef6500 upstream.

Comparing apples to bananas doesn't seem right. Consistently use the
chips enum for chip type comparisons, to avoid such bugs in the
future.

The bug has been there since support for the IT8718F was added, so
VID never worked for this chip nor for the similar IT8720F.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/it87.c

index 9157247fed8e6062877c4428571bb75385e2227b..231a6a5d6d709051b818c1ef0080508c12e44475 100644 (file)
@@ -1028,12 +1028,11 @@ static int __init it87_find(unsigned short *address,
                chip_type, *address, sio_data->revision);
 
        /* Read GPIO config and VID value from LDN 7 (GPIO) */
-       if (chip_type != IT8705F_DEVID) {
+       if (sio_data->type != it87) {
                int reg;
 
                superio_select(GPIO);
-               if ((chip_type == it8718) ||
-                   (chip_type == it8720))
+               if (sio_data->type == it8718 || sio_data->type == it8720)
                        sio_data->vid_value = superio_inb(IT87_SIO_VID_REG);
 
                reg = superio_inb(IT87_SIO_PINX2_REG);