diff mbox series

[v2,4/9] hwmon: (nct7904) Fix incorrect register setting for the high value high limit of voltage.

Message ID c89b56e49cf08098f07175a02ac18460e20aff8b.1560756733.git.amy.shih@advantech.com.tw (mailing list archive)
State Changes Requested
Headers show
Series [v2,1/9] hwmon: (nct7904) Add error handling in probe function. | expand

Commit Message

Amy.Shih@advantech.com.tw June 17, 2019, 8:11 a.m. UTC
From: "amy.shih" <amy.shih@advantech.com.tw>

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

Signed-off-by: amy.shih <amy.shih@advantech.com.tw>
---
Changes in v2:
- Fix incorrect register setting of voltage.

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

Patch

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;