summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2020-08-22 22:29:28 +0000
committerkettenis <kettenis@openbsd.org>2020-08-22 22:29:28 +0000
commit025f8b40bdefe5d8bd71c14f6ad413b5e5adeada (patch)
treed84340b74ba54071a8f50588dc0a777659029c0c
parentPrevent concurrent CREATE_CHILD_SA and INFORMATIONAL exchanges. (diff)
downloadwireguard-openbsd-025f8b40bdefe5d8bd71c14f6ad413b5e5adeada.tar.xz
wireguard-openbsd-025f8b40bdefe5d8bd71c14f6ad413b5e5adeada.zip
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@
-rw-r--r--sys/dev/acpi/dwiic_acpi.c10
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);