]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hwmon: fix w83781d temp sensor type setting
authorMark M. Hoffman <mhoffman@lightlink.com>
Mon, 20 Aug 2007 20:01:50 +0000 (20:01 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Aug 2007 23:23:24 +0000 (16:23 -0700)
Commit 348753379a7704087603dad403603e825422fd9a introduced a regression that
caused temp2 and temp3 sensor type settings to be written to temp1 instead.
The result is that temp sensor readings could be way off.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/w83781d.c

index f85b48fea1c4700d566edd5413ed265ec4e382b9..c95909cc1d219ab35b0e2c2484a9202220dc341b 100644 (file)
@@ -740,9 +740,9 @@ store_sensor(struct device *dev, struct device_attribute *da,
 static SENSOR_DEVICE_ATTR(temp1_type, S_IRUGO | S_IWUSR,
        show_sensor, store_sensor, 0);
 static SENSOR_DEVICE_ATTR(temp2_type, S_IRUGO | S_IWUSR,
-       show_sensor, store_sensor, 0);
+       show_sensor, store_sensor, 1);
 static SENSOR_DEVICE_ATTR(temp3_type, S_IRUGO | S_IWUSR,
-       show_sensor, store_sensor, 0);
+       show_sensor, store_sensor, 2);
 
 /* I2C devices get this name attribute automatically, but for ISA devices
    we must create it by ourselves. */