summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/dsdt.c
diff options
context:
space:
mode:
authorJordan Hargrave <jordan@cvs.openbsd.org>2011-06-02 17:15:54 +0000
committerJordan Hargrave <jordan@cvs.openbsd.org>2011-06-02 17:15:54 +0000
commita0147d174fb633d225c916f13dd64ef448793e10 (patch)
treeb5da36418f02b42fbc8f8048420e0ce845a1ca6f /sys/dev/acpi/dsdt.c
parentfedd99291ef0f168157c2c17616e972cd0f2b329 (diff)
Fix CondRef definition to support optional target. Fixes docking on Dell E4310
ok marco@
Diffstat (limited to 'sys/dev/acpi/dsdt.c')
-rw-r--r--sys/dev/acpi/dsdt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c
index 8a8f4788024..fabe5e77711 100644
--- a/sys/dev/acpi/dsdt.c
+++ b/sys/dev/acpi/dsdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.c,v 1.185 2011/04/22 18:22:01 jordan Exp $ */
+/* $OpenBSD: dsdt.c,v 1.186 2011/06/02 17:15:53 jordan Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
@@ -244,7 +244,7 @@ struct aml_opcode aml_table[] = {
{ AMLOP_INDEX, "Index", "tir", },
{ AMLOP_DEREFOF, "DerefOf", "t", },
{ AMLOP_REFOF, "RefOf", "S", },
- { AMLOP_CONDREFOF, "CondRef", "SS", },
+ { AMLOP_CONDREFOF, "CondRef", "Sr", },
{ AMLOP_LOADTABLE, "LoadTable", "tttttt" },
{ AMLOP_STALL, "Stall", "i", },
@@ -3537,10 +3537,11 @@ aml_parse(struct aml_scope *scope, int ret_type, const char *stype)
ival = 0;
if (opargs[0]->node != NULL) {
/* Create Object Reference */
- opargs[2] = aml_allocvalue(AML_OBJTYPE_OBJREF, opcode,
+ rv = aml_allocvalue(AML_OBJTYPE_OBJREF, opcode,
opargs[0]);
aml_addref(opargs[0], "CondRef");
- aml_store(scope, opargs[1], 0, opargs[2]);
+ aml_store(scope, opargs[1], 0, rv);
+ aml_delref(&rv, 0);
/* Mark that we found it */
ival = -1;