hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT
authorRay Copeland <ray.copeland@aprius.com>
Fri, 5 Feb 2010 18:58:35 +0000 (19:58 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Feb 2010 15:37:45 +0000 (07:37 -0800)
commitea5d622831d40005e9219658d4987b1efd2350ab
tree3119a635fb966504e22ff08bd46d7253de5cd8cc
parent3f28a62b9db311d6f45a5b0d7a9b2d4daae4afe1
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