summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAlex Hemme <ahemme@cisco.com>2017-03-07 14:38:29 -0500
committerGuenter Roeck <linux@roeck-us.net>2017-03-22 00:18:20 -0700
commitdd7406dd334a98ada3ff5371847a3eeb4ba16313 (patch)
tree3b9e729931054dc961a422629086ba6011fcb243 /drivers/hwmon
parent97da3854c526d3a6ee05c849c96e48d21527606c (diff)
hwmon: (max31790) Set correct PWM value
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/max31790.c2
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];