hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT
commit659cba5bf3d94e8e95b4d474e31886c1451cb9be
authorRay Copeland <ray.copeland@aprius.com>
Thu, 1 Apr 2010 22:55:47 +0000 (1 15:55 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:55:47 +0000 (1 15:55 -0700)
treec7c532b9f0672feee3bfe8a4842344cbb90dee10
parent692a97fe93dca8fd1e80f2d0baffa3aade767110
hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT

commit 85f8d3e5faea8bd36c3e5196f8334f7db45e19b2 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/adt7462.c