diff options
author | Lei YU <mine260309@gmail.com> | 2019-04-15 18:37:20 +0800 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2019-04-16 13:17:37 +0930 |
commit | f775b1e7f9e42753caad56231b48689e1dd1edf8 (patch) | |
tree | 28ccaba458f7bf570f3e46ac9d515021c410004e /drivers/hwmon | |
parent | e124b50aeacb66baa42541ebc6c3544350f75a79 (diff) | |
download | talos-obmc-linux-f775b1e7f9e42753caad56231b48689e1dd1edf8.tar.gz talos-obmc-linux-f775b1e7f9e42753caad56231b48689e1dd1edf8.zip |
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.
Signed-off-by: Lei YU <mine260309@gmail.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/occ/sysfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/occ/sysfs.c b/drivers/hwmon/occ/sysfs.c index 743b26ec8e54..f04f502b2e69 100644 --- a/drivers/hwmon/occ/sysfs.c +++ b/drivers/hwmon/occ/sysfs.c @@ -51,16 +51,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; |