From 8073a1b270f19214409c53f383d049edcd3987e3 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 13 Oct 2011 10:40:53 -0400 Subject: [PATCH] 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 --- drivers/hwmon/w83627ehf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index eca61b3a58e7..0729d9b07614 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -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, -- 2.39.5