Skip to content

Commit

Permalink
hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ray Copeland authored and Jean Delvare committed Feb 5, 2010
1 parent fc76be4 commit 85f8d3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/adt7462.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 85f8d3e

Please sign in to comment.