]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/lm78.c
hwmon: (lm78) Prevent misdetection of Winbond chips
[linux-2.6-omap-h63xx.git] / drivers / hwmon / lm78.c
index ec601bbf91b9cbd71cd36eb2aa7e5e5cb67e60f0..f284ecbb9ca801688986f607b4ce7e2ec8f4eb7e 100644 (file)
@@ -613,6 +613,12 @@ static int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
                        err = -ENODEV;
                        goto ERROR2;
                }
+               /* Explicitly prevent the misdetection of Winbond chips */
+               i = lm78_read_value(data, 0x4f);
+               if (i == 0xa3 || i == 0x5c) {
+                       err = -ENODEV;
+                       goto ERROR2;
+               }
        }
 
        /* Determine the chip type. */