diff options
Diffstat (limited to 'sys/contrib/dev/acpica/exstoren.c')
-rw-r--r-- | sys/contrib/dev/acpica/exstoren.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/sys/contrib/dev/acpica/exstoren.c b/sys/contrib/dev/acpica/exstoren.c index 189136b..23054a0 100644 --- a/sys/contrib/dev/acpica/exstoren.c +++ b/sys/contrib/dev/acpica/exstoren.c @@ -3,7 +3,7 @@ * * Module Name: exstoren - AML Interpreter object store support, * Store to Node (namespace object) - * $Revision: 59 $ + * $Revision: 1.64 $ * *****************************************************************************/ @@ -11,7 +11,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. * All rights reserved. * * 2. License @@ -155,9 +155,8 @@ AcpiExResolveObject ( ACPI_FUNCTION_TRACE ("ExResolveObject"); - /* - * Ensure we have a Target that can be stored to - */ + /* Ensure we have a Target that can be stored to */ + switch (TargetType) { case ACPI_TYPE_BUFFER_FIELD: @@ -196,17 +195,15 @@ AcpiExResolveObject ( break; } - /* - * Must have a Integer, Buffer, or String - */ + /* Must have a Integer, Buffer, or String */ + if ((ACPI_GET_OBJECT_TYPE (SourceDesc) != ACPI_TYPE_INTEGER) && (ACPI_GET_OBJECT_TYPE (SourceDesc) != ACPI_TYPE_BUFFER) && (ACPI_GET_OBJECT_TYPE (SourceDesc) != ACPI_TYPE_STRING) && !((ACPI_GET_OBJECT_TYPE (SourceDesc) == ACPI_TYPE_LOCAL_REFERENCE) && (SourceDesc->Reference.Opcode == AML_LOAD_OP))) { - /* - * Conversion successful but still not a valid type - */ + /* Conversion successful but still not a valid type */ + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Cannot assign type %s to %s (must be type Int/Str/Buf)\n", AcpiUtGetObjectTypeName (SourceDesc), @@ -219,9 +216,8 @@ AcpiExResolveObject ( case ACPI_TYPE_LOCAL_ALIAS: case ACPI_TYPE_LOCAL_METHOD_ALIAS: - /* - * Aliases are resolved by AcpiExPrepOperands - */ + /* Aliases are resolved by AcpiExPrepOperands */ + ACPI_REPORT_ERROR (("Store into Alias - should never happen\n")); Status = AE_AML_INTERNAL; break; @@ -313,8 +309,8 @@ AcpiExStoreObjectToObject ( * Otherwise, ActualSrcDesc is a temporary object to hold the * converted object. */ - Status = AcpiExConvertToTargetType (ACPI_GET_OBJECT_TYPE (DestDesc), SourceDesc, - &ActualSrcDesc, WalkState); + Status = AcpiExConvertToTargetType (ACPI_GET_OBJECT_TYPE (DestDesc), + SourceDesc, &ActualSrcDesc, WalkState); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -323,7 +319,7 @@ AcpiExStoreObjectToObject ( if (SourceDesc == ActualSrcDesc) { /* - * No conversion was performed. Return the SourceDesc as the + * No conversion was performed. Return the SourceDesc as the * new object. */ *NewDesc = SourceDesc; @@ -358,7 +354,8 @@ AcpiExStoreObjectToObject ( case ACPI_TYPE_PACKAGE: - Status = AcpiUtCopyIobjectToIobject (ActualSrcDesc, &DestDesc, WalkState); + Status = AcpiUtCopyIobjectToIobject (ActualSrcDesc, &DestDesc, + WalkState); break; default: |