diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:38:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:38:54 +0200 |
commit | 412a5feba414127a6c69452dfad454086867011f (patch) | |
tree | bf5934b41bff82f4ec69283d10fb1a799f42a641 /drivers/hwmon/occ/common.c | |
parent | 5f0ac3a1dae17ec0af6b845376247d7cc948ea3d (diff) | |
parent | 519d81956ee277b4419c723adfb154603c2565ba (diff) | |
download | lwn-412a5feba414127a6c69452dfad454086867011f.tar.gz lwn-412a5feba414127a6c69452dfad454086867011f.zip |
Merge 5.15-rc6 into tty-next
We need the serial/tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon/occ/common.c')
-rw-r--r-- | drivers/hwmon/occ/common.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/hwmon/occ/common.c b/drivers/hwmon/occ/common.c index 0d68a78be980..ae664613289c 100644 --- a/drivers/hwmon/occ/common.c +++ b/drivers/hwmon/occ/common.c @@ -340,18 +340,11 @@ static ssize_t occ_show_temp_10(struct device *dev, if (val == OCC_TEMP_SENSOR_FAULT) return -EREMOTEIO; - /* - * VRM doesn't return temperature, only alarm bit. This - * attribute maps to tempX_alarm instead of tempX_input for - * VRM - */ - if (temp->fru_type != OCC_FRU_TYPE_VRM) { - /* sensor not ready */ - if (val == 0) - return -EAGAIN; + /* sensor not ready */ + if (val == 0) + return -EAGAIN; - val *= 1000; - } + val *= 1000; break; case 2: val = temp->fru_type; @@ -886,7 +879,7 @@ static int occ_setup_sensor_attrs(struct occ *occ) 0, i); attr++; - if (sensors->temp.version > 1 && + if (sensors->temp.version == 2 && temp->fru_type == OCC_FRU_TYPE_VRM) { snprintf(attr->name, sizeof(attr->name), "temp%d_alarm", s); |