]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hwmon: (w83627ehf) Skip reading unused voltage registers
authorJean Delvare <khali@linux-fr.org>
Thu, 13 Oct 2011 14:40:53 +0000 (10:40 -0400)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Thu, 13 Oct 2011 15:33:52 +0000 (08:33 -0700)
When in6 is missing, don't read the corresponding registers, it's a
waste of time. The logic is similar to what we do for fans and
temperatures.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/w83627ehf.c

index eca61b3a58e74d9eab7536ac62f17f994cb2f452..0729d9b07614380dffab1829306336fbf0d3241e 100644 (file)
@@ -774,6 +774,9 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev)
 
                /* Measured voltages and limits */
                for (i = 0; i < data->in_num; i++) {
+                       if ((i == 6) && data->in6_skip)
+                               continue;
+
                        data->in[i] = w83627ehf_read_value(data,
                                      W83627EHF_REG_IN(i));
                        data->in_min[i] = w83627ehf_read_value(data,