diff options
author | Jean Delvare <khali@linux-fr.org> | 2011-10-13 10:40:53 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-10-24 11:09:45 -0700 |
commit | 389ef65d2eae579b23af719f5ef18d625f41fada (patch) | |
tree | a6284171c5bc63f0e3439c5337b33fd39d80b7b3 /drivers | |
parent | e96f9d89e6213c7630a3323cd0c754e7f2619564 (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')
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 3 |
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) /* 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, |