From: Nikolaus Schulz Date: Wed, 8 Feb 2012 17:56:09 +0000 (+0100) Subject: hwmon: (f75375s) Fix reading of wrong register when initializing the F75387 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a367a1e08b21e995c7112ff32b5efc97d104d405;p=openwrt%2Fstaging%2Fblogic.git hwmon: (f75375s) Fix reading of wrong register when initializing the F75387 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 Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index c81ad45d9fa9..b3eef4474a98 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c @@ -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);