diff options
Diffstat (limited to 'sys/contrib/dev/acpica/dsobject.c')
-rw-r--r-- | sys/contrib/dev/acpica/dsobject.c | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/sys/contrib/dev/acpica/dsobject.c b/sys/contrib/dev/acpica/dsobject.c index a997831..6264038 100644 --- a/sys/contrib/dev/acpica/dsobject.c +++ b/sys/contrib/dev/acpica/dsobject.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: dsobject - Dispatcher object management routines - * $Revision: 81 $ + * $Revision: 85 $ * *****************************************************************************/ @@ -352,6 +352,8 @@ AcpiDsInitObjectFromOp ( { case ACPI_TYPE_BUFFER: + ObjDesc->Buffer.Node = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0]; + /* First arg is a number */ AcpiDsCreateOperand (WalkState, Op->Value.Arg, 0); @@ -448,11 +450,11 @@ AcpiDsInitObjectFromOp ( ObjDesc->String.Pointer = Op->Value.String; ObjDesc->String.Length = STRLEN (Op->Value.String); - /* + /* * The string is contained in the ACPI table, don't ever try * to delete it */ - ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER; + ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER; break; @@ -531,7 +533,6 @@ AcpiDsBuildInternalSimpleObj ( ACPI_OPERAND_OBJECT **ObjDescPtr) { ACPI_OPERAND_OBJECT *ObjDesc; - ACPI_OBJECT_TYPE8 Type; ACPI_STATUS Status; UINT32 Length; char *Name; @@ -543,17 +544,15 @@ AcpiDsBuildInternalSimpleObj ( if (Op->Opcode == AML_INT_NAMEPATH_OP) { /* - * This is an object reference. If The name was - * previously looked up in the NS, it is stored in this op. + * This is an object reference. If this name was + * previously looked up in the namespace, it was stored in this op. * Otherwise, go ahead and look it up now */ if (!Op->Node) { - Status = AcpiNsLookup (WalkState->ScopeInfo, - Op->Value.String, ACPI_TYPE_ANY, - IMODE_EXECUTE, - NS_SEARCH_PARENT | NS_DONT_OPEN_SCOPE, - NULL, + Status = AcpiNsLookup (WalkState->ScopeInfo, Op->Value.String, + ACPI_TYPE_ANY, IMODE_EXECUTE, + NS_SEARCH_PARENT | NS_DONT_OPEN_SCOPE, NULL, (ACPI_NAMESPACE_NODE **)&(Op->Node)); if (ACPI_FAILURE (Status)) @@ -585,24 +584,11 @@ AcpiDsBuildInternalSimpleObj ( } } } - - /* - * The reference will be a Reference - * TBD: [Restructure] unless we really need a separate - * type of INTERNAL_TYPE_REFERENCE change - * AcpiDsMapOpcodeToDataType to handle this case - */ - Type = INTERNAL_TYPE_REFERENCE; - } - else - { - Type = AcpiDsMapOpcodeToDataType (Op->Opcode, NULL); } - /* Create and init the internal ACPI object */ - ObjDesc = AcpiUtCreateInternalObject (Type); + ObjDesc = AcpiUtCreateInternalObject ((AcpiPsGetOpcodeInfo (Op->Opcode))->ObjectType); if (!ObjDesc) { return_ACPI_STATUS (AE_NO_MEMORY); @@ -785,7 +771,7 @@ AcpiDsCreateNode ( * parts of the table, we can arrive here twice. Only init * the named object node the first time through */ - if (Node->Object) + if (AcpiNsGetAttachedObject (Node)) { return_ACPI_STATUS (AE_OK); } |