提交 3b5169c2 编写于 作者: G Guenter Roeck

hwmon: (adm9240) Fix writes into inX_max attributes

When converting the driver to use the devm_hwmon_device_register_with_info
API, the wrong register was selected when writing into inX_max attributes.
Fix it.

Fixes: 124b7e34 ("hwmon: (adm9240) Convert to devm_hwmon_device_register_with_info API")
Reported-by: NChris Packham <Chris.Packham@alliedtelesis.co.nz>
Tested-by: NChris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 8370e5b0
......@@ -485,7 +485,7 @@ static int adm9240_in_write(struct device *dev, u32 attr, int channel, long val)
reg = ADM9240_REG_IN_MIN(channel);
break;
case hwmon_in_max:
reg = ADM9240_REG_IN(channel);
reg = ADM9240_REG_IN_MAX(channel);
break;
default:
return -EOPNOTSUPP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册