diff options
Diffstat (limited to 'source/components/executer/exoparg1.c')
-rw-r--r-- | source/components/executer/exoparg1.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/source/components/executer/exoparg1.c b/source/components/executer/exoparg1.c index a0efb25ece22..5d59276be8c1 100644 --- a/source/components/executer/exoparg1.c +++ b/source/components/executer/exoparg1.c @@ -959,7 +959,7 @@ AcpiExOpcode_1A_0T_1R ( if (ACPI_GET_DESCRIPTOR_TYPE (Operand[0]) == ACPI_DESC_TYPE_NAMED) { TempDesc = AcpiNsGetAttachedObject ( - (ACPI_NAMESPACE_NODE *) Operand[0]); + (ACPI_NAMESPACE_NODE *) Operand[0]); if (TempDesc && ((TempDesc->Common.Type == ACPI_TYPE_STRING) || (TempDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE))) @@ -1072,11 +1072,27 @@ AcpiExOpcode_1A_0T_1R ( * This is a DerefOf (ObjectReference) * Get the actual object from the Node (This is the dereference). * This case may only happen when a LocalX or ArgX is - * dereferenced above. + * dereferenced above, or for references to device and + * thermal objects. */ - ReturnDesc = AcpiNsGetAttachedObject ( - (ACPI_NAMESPACE_NODE *) Operand[0]); - AcpiUtAddReference (ReturnDesc); + switch (((ACPI_NAMESPACE_NODE *) Operand[0])->Type) + { + case ACPI_TYPE_DEVICE: + case ACPI_TYPE_THERMAL: + + /* These types have no node subobject, return the NS node */ + + ReturnDesc = Operand[0]; + break; + + default: + /* For most types, get the object attached to the node */ + + ReturnDesc = AcpiNsGetAttachedObject ( + (ACPI_NAMESPACE_NODE *) Operand[0]); + AcpiUtAddReference (ReturnDesc); + break; + } } else { |