From: kettenis Date: Wed, 15 Mar 2023 13:01:40 +0000 (+0000) Subject: Add missing nameref resolving for the _DEP() package elements that indicate X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=338d44a6d77cad23700051b89059b0cacb00a8af;p=openbsd Add missing nameref resolving for the _DEP() package elements that indicate dependencies between ACPI devices. ok dlg@, deraadt@ --- diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 853bad1ab43..3bedd6967d2 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.419 2023/02/10 14:34:16 visa Exp $ */ +/* $OpenBSD: acpi.c,v 1.420 2023/03/15 13:01:40 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -2963,6 +2963,12 @@ acpi_attach_deps(struct acpi_softc *sc, struct aml_node *node) for (i = 0; i < res.length; i++) { val = res.v_package[i]; + if (val->type == AML_OBJTYPE_NAMEREF) { + node = aml_searchrel(node, + aml_getname(val->v_nameref)); + if (node) + val = node->value; + } if (val->type == AML_OBJTYPE_OBJREF) val = val->v_objref.ref; if (val->type != AML_OBJTYPE_DEVICE)