aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-10-13 10:40:53 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-10-24 14:09:45 -0400
commit389ef65d2eae579b23af719f5ef18d625f41fada (patch)
treea6284171c5bc63f0e3439c5337b33fd39d80b7b3 /drivers/hwmon
parente96f9d89e6213c7630a3323cd0c754e7f2619564 (diff)
hwmon: (w83627ehf) Skip reading unused voltage registers
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/w83627ehf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index e1736b80b6b0..c77a4b92ebc9 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -775,6 +775,9 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev)
775 775
776 /* Measured voltages and limits */ 776 /* Measured voltages and limits */
777 for (i = 0; i < data->in_num; i++) { 777 for (i = 0; i < data->in_num; i++) {
778 if ((i == 6) && data->in6_skip)
779 continue;
780
778 data->in[i] = w83627ehf_read_value(data, 781 data->in[i] = w83627ehf_read_value(data,
779 W83627EHF_REG_IN(i)); 782 W83627EHF_REG_IN(i));
780 data->in_min[i] = w83627ehf_read_value(data, 783 data->in_min[i] = w83627ehf_read_value(data,