Skip to content

Commit

Permalink
hwmon: (w83627ehf) Skip reading unused voltage registers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean Delvare authored and Guenter Roeck committed Oct 24, 2011
1 parent e96f9d8 commit 389ef65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/hwmon/w83627ehf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 389ef65

Please sign in to comment.