diff options
author | Alex Hemme <ahemme@cisco.com> | 2017-03-07 14:38:29 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-25 14:23:38 +0100 |
commit | 2101ccbc2a91490fd160946291f09417fbc17b18 (patch) | |
tree | a3db840ea6dd7eb14c624237251da9b74de3a769 /drivers/hwmon | |
parent | 4ee082a72731bc279a69b60d2e085a960686962d (diff) | |
download | linux-rt-2101ccbc2a91490fd160946291f09417fbc17b18.tar.gz |
hwmon: (max31790) Set correct PWM value
[ Upstream commit dd7406dd334a98ada3ff5371847a3eeb4ba16313 ]
Traced fans not spinning to incorrect PWM value being written.
The passed in value was written instead of the calulated value.
Fixes: 54187ff9d766 ("hwmon: (max31790) Convert to use new hwmon registration API")
Signed-off-by: Alex Hemme <ahemme@cisco.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/max31790.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/max31790.c b/drivers/hwmon/max31790.c index c1b9275978f9..281491cca510 100644 --- a/drivers/hwmon/max31790.c +++ b/drivers/hwmon/max31790.c @@ -311,7 +311,7 @@ static int max31790_write_pwm(struct device *dev, u32 attr, int channel, data->pwm[channel] = val << 8; err = i2c_smbus_write_word_swapped(client, MAX31790_REG_PWMOUT(channel), - val); + data->pwm[channel]); break; case hwmon_pwm_enable: fan_config = data->fan_config[channel]; |