Skip to content

Commit

Permalink
hwmon: (max31790) Set correct PWM value
Browse files Browse the repository at this point in the history
Traced fans not spinning to incorrect PWM value being written.
The passed in value was written instead of the calulated value.

Fixes: 54187ff ("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>
  • Loading branch information
Alex Hemme authored and Guenter Roeck committed Mar 22, 2017
1 parent 97da385 commit dd7406d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/max31790.c
Original file line number Diff line number Diff line change
@@ -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];

0 comments on commit dd7406d

Please sign in to comment.