[PATCH 1/2] hwmon: (w83627ehf) Skip reading unused voltage registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
This patch and the following one have been sitting on my drive for too
long, it's about time to get them reviewed and merged.

 drivers/hwmon/w83627ehf.c |    3 +++
 1 file changed, 3 insertions(+)

--- linux-2.6.39-rc0.orig/drivers/hwmon/w83627ehf.c	2011-03-18 14:56:30.000000000 +0100
+++ linux-2.6.39-rc0/drivers/hwmon/w83627ehf.c	2011-03-18 16:25:29.000000000 +0100
@@ -770,6 +770,9 @@ static struct w83627ehf_data *w83627ehf_
 
 		/* 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,


-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux