From: Jean Delvare Date: Thu, 13 Oct 2011 14:40:53 +0000 (-0400) Subject: hwmon: (w83627ehf) Skip reading unused voltage registers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=389ef65d2eae579b23af719f5ef18d625f41fada;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: Guenter Roeck --- 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,