diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-02-15 11:57:10 -0500 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-02-19 20:34:15 -0500 |
commit | 6e7d3b6bb9af358b2bf05cccb025ac5d66630b47 (patch) | |
tree | 059828e559ed2dac772605899ac26d224ed49029 | |
parent | d47682803776f147ee9662a505c63bbbf27a1274 (diff) |
hwmon: (adt7410) Clear unwanted bits in the config register
Make sure to clear the mode bits from the config register before setting the new
mode. Otherwise we might end up with a different mode than we want to.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/hwmon/adt7410.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/adt7410.c b/drivers/hwmon/adt7410.c index 797c2b85c483..4ccee4fbfd73 100644 --- a/drivers/hwmon/adt7410.c +++ b/drivers/hwmon/adt7410.c | |||
@@ -364,6 +364,7 @@ static int adt7410_probe(struct i2c_client *client, | |||
364 | /* | 364 | /* |
365 | * Set to 16 bit resolution, continous conversion and comparator mode. | 365 | * Set to 16 bit resolution, continous conversion and comparator mode. |
366 | */ | 366 | */ |
367 | ret &= ~ADT7410_MODE_MASK; | ||
367 | data->config = ret | ADT7410_FULL | ADT7410_RESOLUTION | | 368 | data->config = ret | ADT7410_FULL | ADT7410_RESOLUTION | |
368 | ADT7410_EVENT_MODE; | 369 | ADT7410_EVENT_MODE; |
369 | if (data->config != data->oldconfig) { | 370 | if (data->config != data->oldconfig) { |