hwmon: (w83627ehf) Fix writing into fan_stop_time for NCT6775F/NCT6776F
authorGuenter Roeck <linux@roeck-us.net>
Mon, 12 Mar 2012 15:21:16 +0000 (08:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2012 15:57:59 +0000 (08:57 -0700)
commit 33fa9b620409edfc71aa6cf01a51f990fbe46ab8 upstream.

NCT6775F and NCT6776F have their own set of registers for FAN_STOP_TIME. The
correct registers were used to read FAN_STOP_TIME, but writes used the wrong
registers. Fix it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/w83627ehf.c

index 359bb1e23ac5f27cda0d3dba27e23c942c45cb8f..685399b5334cce72aa3af7f717d4c8e7c3a860a4 100644 (file)
@@ -1583,7 +1583,7 @@ store_##reg(struct device *dev, struct device_attribute *attr, \
        val = step_time_to_reg(val, data->pwm_mode[nr]); \
        mutex_lock(&data->update_lock); \
        data->reg[nr] = val; \
-       w83627ehf_write_value(data, W83627EHF_REG_##REG[nr], val); \
+       w83627ehf_write_value(data, data->REG_##REG[nr], val); \
        mutex_unlock(&data->update_lock); \
        return count; \
 } \