mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
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: stable@vger.kernel.org
Fixes: df04ced684
("hwmon (occ): Add sysfs attributes for additional OCC data")
Signed-off-by: Lei YU <mine260309@gmail.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
53f1647da3
commit
b88c504921
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue