diff options
author | Ray Copeland <ray.copeland@aprius.com> | 2010-02-05 21:58:35 +0300 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2010-02-05 21:58:35 +0300 |
commit | 85f8d3e5faea8bd36c3e5196f8334f7db45e19b2 (patch) | |
tree | 20b07a4729e074c775108a06eeafde227951751e /drivers/hwmon/adt7462.c | |
parent | fc76be434d90bcd57a0ea6b93a2e66a3fec4b664 (diff) | |
download | linux-85f8d3e5faea8bd36c3e5196f8334f7db45e19b2.tar.xz |
hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT
The #define ADT7462_VOLT_COUNT is wrong, it should be 13 not 12. All the
for loops that use this as a limit count are of the typical form, "for
(n = 0; n < ADT7462_VOLT_COUNT; n++)", so to loop through all voltages
w/o missing the last one it is necessary for the count to be one greater
than it is. (Specifically, you will miss the +1.5V 3GPIO input with count
= 12 vs. 13.)
Signed-off-by: Ray Copeland <ray.copeland@aprius.com>
Acked-by: "Darrick J. Wong" <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Diffstat (limited to 'drivers/hwmon/adt7462.c')
-rw-r--r-- | drivers/hwmon/adt7462.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c index a31e77c776ae..b8156b4893bb 100644 --- a/drivers/hwmon/adt7462.c +++ b/drivers/hwmon/adt7462.c @@ -179,7 +179,7 @@ static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END }; * * Some, but not all, of these voltages have low/high limits. */ -#define ADT7462_VOLT_COUNT 12 +#define ADT7462_VOLT_COUNT 13 #define ADT7462_VENDOR 0x41 #define ADT7462_DEVICE 0x62 |