aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei YU <[email protected]>2019-04-15 18:37:20 +0800
committerGuenter Roeck <[email protected]>2019-04-15 17:19:23 -0700
commitb88c5049219a7f322bb1fd65fc30d17472a23563 (patch)
tree77ed2fac05f5148fe427b8d9f70e4336f1c19513
parent53f1647da3e8fb3e89066798f0fdc045064d353d (diff)
hwmon: (occ) Fix extended status bits
The occ's extended status is checked and shown as sysfs attributes. But the code was incorrectly checking the "status" bits. Fix it by checking the "ext_status" bits. Cc: [email protected] Fixes: df04ced684d4 ("hwmon (occ): Add sysfs attributes for additional OCC data") Signed-off-by: Lei YU <[email protected]> Reviewed-by: Eddie James <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
-rw-r--r--drivers/hwmon/occ/sysfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/occ/sysfs.c b/drivers/hwmon/occ/sysfs.c
index fe3d15e416e7..a71ca94c789f 100644
--- a/drivers/hwmon/occ/sysfs.c
+++ b/drivers/hwmon/occ/sysfs.c
@@ -42,16 +42,16 @@ static ssize_t occ_sysfs_show(struct device *dev,
val = !!(header->status & OCC_STAT_ACTIVE);
break;
case 2:
- val = !!(header->status & OCC_EXT_STAT_DVFS_OT);
+ val = !!(header->ext_status & OCC_EXT_STAT_DVFS_OT);
break;
case 3:
- val = !!(header->status & OCC_EXT_STAT_DVFS_POWER);
+ val = !!(header->ext_status & OCC_EXT_STAT_DVFS_POWER);
break;
case 4:
- val = !!(header->status & OCC_EXT_STAT_MEM_THROTTLE);
+ val = !!(header->ext_status & OCC_EXT_STAT_MEM_THROTTLE);
break;
case 5:
- val = !!(header->status & OCC_EXT_STAT_QUICK_DROP);
+ val = !!(header->ext_status & OCC_EXT_STAT_QUICK_DROP);
break;
case 6:
val = header->occ_state;