From: "amy.shih" <[email protected]>

In function nct7904_write_in, the high value high limit of voltage
registers should be VSEN1_HV_HL_REG.

Signed-off-by: amy.shih <[email protected]>
---
Changes in v2:
- Fix incorrect register setting of voltage.

 drivers/hwmon/nct7904.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c
index cdd67932938d..402c1bb2a99f 100644
--- a/drivers/hwmon/nct7904.c
+++ b/drivers/hwmon/nct7904.c
@@ -615,12 +615,12 @@ static int nct7904_write_in(struct device *dev, u32 attr, 
int channel,
                if (ret < 0)
                        return ret;
                tmp = nct7904_read_reg(data, BANK_1,
-                                      VSEN1_HV_LL_REG + index * 4);
+                                      VSEN1_HV_HL_REG + index * 4);
                if (tmp < 0)
                        return tmp;
                tmp = (val >> 3) & 0xff;
                ret = nct7904_write_reg(data, BANK_1,
-                                       VSEN1_HV_LL_REG + index * 4, tmp);
+                                       VSEN1_HV_HL_REG + index * 4, tmp);
                return ret;
        default:
                return -EOPNOTSUPP;
-- 
2.17.1

Reply via email to