hwmon: (f75375s) Fix reading of wrong register when initializing the F75387
authorNikolaus Schulz <schulz@macnetix.de>
Wed, 8 Feb 2012 17:56:09 +0000 (18:56 +0100)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Thu, 9 Feb 2012 04:47:33 +0000 (20:47 -0800)
Unlike the other chips supported by this driver, the F75387 stores the
pwm_mode in register F75375_REG_FAN_TIMER, not F75375_REG_CONFIG1.

Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/f75375s.c

index c81ad45d9fa9e5074b7fb5284473c99b8cf4743e..b3eef4474a98ee4690571027cd4f1b9a8d060b60 100644 (file)
@@ -723,7 +723,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data,
                        if (data->kind == f75387) {
                                bool manu, duty;
 
-                               if (!(conf & (1 << F75387_FAN_CTRL_LINEAR(nr))))
+                               if (!(mode & (1 << F75387_FAN_CTRL_LINEAR(nr))))
                                        data->pwm_mode[nr] = 1;
 
                                manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1);