summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-03-10 21:27:08 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-03-10 21:27:08 +0000
commit181039fa32ae91cb38b3d035924dc0b0459a8415 (patch)
tree76ec40e416b62847f21b18094bce1c5738552846 /sys/dev
parent20e55346c9c0e350d7aca822785b62ee3e2805b8 (diff)
Seems the _REG method is optional, so only run it if it is present.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpiec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpiec.c b/sys/dev/acpi/acpiec.c
index 0eda990812a..cabb3000441 100644
--- a/sys/dev/acpi/acpiec.c
+++ b/sys/dev/acpi/acpiec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiec.c,v 1.44 2011/01/09 22:27:21 jordan Exp $ */
+/* $OpenBSD: acpiec.c,v 1.45 2012/03/10 21:27:07 kettenis Exp $ */
/*
* Copyright (c) 2006 Can Erkin Acar <canacar@openbsd.org>
*
@@ -499,6 +499,7 @@ int
acpiec_reg(struct acpiec_softc *sc)
{
struct aml_value arg[2];
+ struct aml_node *node;
memset(&arg, 0, sizeof(arg));
arg[0].type = AML_OBJTYPE_INTEGER;
@@ -506,8 +507,8 @@ acpiec_reg(struct acpiec_softc *sc)
arg[1].type = AML_OBJTYPE_INTEGER;
arg[1].v_integer = 1;
- if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_REG", 2,
- arg, NULL) != 0) {
+ node = aml_searchname(sc->sc_devnode, "_REG");
+ if (node && aml_evalnode(sc->sc_acpi, node, 2, arg, NULL)) {
dnprintf(10, "%s: eval method _REG failed\n", DEVNAME(sc));
printf("acpiec _REG failed, broken BIOS\n");
}