aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm78.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/lm78.c')
-rw-r--r--drivers/hwmon/lm78.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c
index ec601bbf91b..f284ecbb9ca 100644
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -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. */