summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-06-27 11:22:46 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-03 12:42:24 -0700
commit80cf500447b42c201db5116d1591d39f1d4530f1 (patch)
tree9ce48f62adc48adc7123e1a7ed7cd2a31994bf15 /drivers
parent3e04233dfb00de548700e29f59f733d0f616f3a2 (diff)
downloadlinux-stable-80cf500447b42c201db5116d1591d39f1d4530f1.tar.gz
linux-stable-80cf500447b42c201db5116d1591d39f1d4530f1.tar.bz2
linux-stable-80cf500447b42c201db5116d1591d39f1d4530f1.zip
hwmon: (lm95241) Fix chip detection code
commit 27739e694a3c34b5e371575d74e500d60111c689 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/lm95241.c2
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,
if ((i2c_smbus_read_byte_data(new_client, LM95241_REG_R_MAN_ID)
== MANUFACTURER_ID)
&& (i2c_smbus_read_byte_data(new_client, LM95241_REG_R_CHIP_ID)
- >= DEFAULT_REVISION)) {
+ == DEFAULT_REVISION)) {
name = DEVNAME;
} else {
dev_dbg(&adapter->dev, "LM95241 detection failed at 0x%02x\n",