diff options
author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-06-27 14:22:46 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-07-08 20:52:59 -0400 |
commit | 27739e694a3c34b5e371575d74e500d60111c689 (patch) | |
tree | 53daf18502775272d26174ccd96c8c2678806751 /drivers | |
parent | fe0d42203cb5616eeff68b14576a0f7e2dd56625 (diff) |
hwmon: (lm95241) Fix chip detection code
The LM95241 driver accepts every chip ID equal to or larger than 0xA4 as its
own, and other chips such as LM95245 use chip IDs in the accepted ID range.
This results in false chip detection.
Fix problem by accepting only the known LM95241 chip ID.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.30+
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/lm95241.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/lm95241.c b/drivers/hwmon/lm95241.c index 1a6dfb6df1e7..01c638e31e07 100644 --- a/drivers/hwmon/lm95241.c +++ b/drivers/hwmon/lm95241.c | |||
@@ -339,7 +339,7 @@ static int lm95241_detect(struct i2c_client *new_client, | |||
339 | if ((i2c_smbus_read_byte_data(new_client, LM95241_REG_R_MAN_ID) | 339 | if ((i2c_smbus_read_byte_data(new_client, LM95241_REG_R_MAN_ID) |
340 | == MANUFACTURER_ID) | 340 | == MANUFACTURER_ID) |
341 | && (i2c_smbus_read_byte_data(new_client, LM95241_REG_R_CHIP_ID) | 341 | && (i2c_smbus_read_byte_data(new_client, LM95241_REG_R_CHIP_ID) |
342 | >= DEFAULT_REVISION)) { | 342 | == DEFAULT_REVISION)) { |
343 | name = DEVNAME; | 343 | name = DEVNAME; |
344 | } else { | 344 | } else { |
345 | dev_dbg(&adapter->dev, "LM95241 detection failed at 0x%02x\n", | 345 | dev_dbg(&adapter->dev, "LM95241 detection failed at 0x%02x\n", |