diff options
| author | riastradh <riastradh@NetBSD.org> | 2021-12-31 17:22:35 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2021-12-31 17:22:35 +0000 |
| commit | 528ecaebc8ab7999f8d64be026ba87db4001eb40 (patch) | |
| tree | 297c7ce8f4e572c9a6458d92bfb2ad09d552c4c9 /sys/dev | |
| parent | 3a2a741d880b8aa569b9d54c27891ffbd9ad6e02 (diff) | |
thinkpad(4): Omit workaround for acpiec_bus_read.
acpiec_bus_read now initializes the whole ACPI_INTEGER like its
signature suggests, so we don't need to pick out the low bits of the
result or carefully avoid undefined behaviour from uninitialized
stack garbage.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/acpi/thinkpad_acpi.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/dev/acpi/thinkpad_acpi.c b/sys/dev/acpi/thinkpad_acpi.c index 12826a1676e..35005120d57 100644 --- a/sys/dev/acpi/thinkpad_acpi.c +++ b/sys/dev/acpi/thinkpad_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: thinkpad_acpi.c,v 1.53 2021/05/30 11:24:10 riastradh Exp $ */ +/* $NetBSD: thinkpad_acpi.c,v 1.54 2021/12/31 17:22:35 riastradh Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.53 2021/05/30 11:24:10 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.54 2021/12/31 17:22:35 riastradh Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -803,12 +803,6 @@ thinkpad_fan_refresh(struct sysmon_envsys *sme, envsys_data_t *edata) return; } - /* - * Extract the low bytes from buffers - */ - lo = ((uint8_t *)&lo)[0]; - hi = ((uint8_t *)&hi)[0]; - rpm = ((((int)hi) << 8) | ((int)lo)); if (rpm < 0) { edata->state = ENVSYS_SINVALID; |
