Message ID | 87e748a5f2e7d8e6ef69fa5acb177cb0a1474cb2.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 |
diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c index 402c1bb2a99f..95348eebe8e4 100644 --- a/drivers/hwmon/nct7904.c +++ b/drivers/hwmon/nct7904.c @@ -356,7 +356,7 @@ static int nct7904_read_temp(struct device *dev, u32 attr, int channel, SMI_STS1_REG); if (ret < 0) return ret; - *val = (ret >> (channel & 0x07)) & 1; + *val = (ret >> (((channel * 2) + 1) & 0x07)) & 1; } else { if ((channel - 5) < 4) { ret = nct7904_read_reg(data, BANK_0,