diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-08-22 22:29:29 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-08-22 22:29:29 +0000 |
commit | 51bf1d552925980fc505b294fe77f64c6f570f00 (patch) | |
tree | 18fb73c5c0abd22b0c1df9237808836670cfc7cc /sys/dev/acpi | |
parent | 8a9ae903719f3e338629eecd94ceacadf69d4776 (diff) |
Don't complain when child nodes don't have a _CRS method. This happens for
example for control method batteries that are attached to I2C but use an
OperationRegion() to access the I2C device.
ok jcs@, gnedzo@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/dwiic_acpi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/acpi/dwiic_acpi.c b/sys/dev/acpi/dwiic_acpi.c index 5cb014bba61..0c9b25e0956 100644 --- a/sys/dev/acpi/dwiic_acpi.c +++ b/sys/dev/acpi/dwiic_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwiic_acpi.c,v 1.15 2020/07/23 09:21:51 jsg Exp $ */ +/* $OpenBSD: dwiic_acpi.c,v 1.16 2020/08/22 22:29:28 kettenis Exp $ */ /* * Synopsys DesignWare I2C controller * @@ -369,11 +369,9 @@ dwiic_acpi_found_hid(struct aml_node *node, void *arg) DPRINTF(("%s: found HID %s at %s\n", sc->sc_dev.dv_xname, dev, aml_nodename(node))); - if (aml_evalname(acpi_softc, node->parent, "_CRS", 0, NULL, &res)) { - printf("%s: no _CRS method at %s\n", sc->sc_dev.dv_xname, - aml_nodename(node->parent)); - return (0); - } + if (aml_evalname(acpi_softc, node->parent, "_CRS", 0, NULL, &res)) + return 0; + if (res.type != AML_OBJTYPE_BUFFER || res.length < 5) { printf("%s: invalid _CRS object (type %d len %d)\n", sc->sc_dev.dv_xname, res.type, res.length); |