X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Futilities%2Futcopy.c;h=5b2f7c27b705f2714c9fce18f997837ff8bdf6f3;hb=1f6d6e8ebe73ba9d9d4c693f7f6f50f661dbd6e4;hp=53499ac90988a19477b39bd9c0113c14594cbf5f;hpb=837b41b5de356aa67abb2cadb5eef3efc7776f91;p=linux-2.6-omap-h63xx.git diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 53499ac9098..5b2f7c27b70 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c @@ -42,7 +42,6 @@ */ #include -#include #include @@ -176,20 +175,24 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, /* This is an object reference. */ - switch (internal_object->reference.opcode) { - case AML_INT_NAMEPATH_OP: - - /* For namepath, return the object handle ("reference") */ - - default: - - /* We are referring to the namespace node */ + switch (internal_object->reference.class) { + case ACPI_REFCLASS_NAME: + /* + * For namepath, return the object handle ("reference") + * We are referring to the namespace node + */ external_object->reference.handle = internal_object->reference.node; external_object->reference.actual_type = acpi_ns_get_type(internal_object->reference.node); break; + + default: + + /* All other reference types are unsupported */ + + return_ACPI_STATUS(AE_TYPE); } break; @@ -533,7 +536,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, /* TBD: should validate incoming handle */ - internal_object->reference.opcode = AML_INT_NAMEPATH_OP; + internal_object->reference.class = ACPI_REFCLASS_NAME; internal_object->reference.node = external_object->reference.handle; break; @@ -743,11 +746,11 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, * We copied the reference object, so we now must add a reference * to the object pointed to by the reference * - * DDBHandle reference (from Load/load_table is a special reference, - * it's Reference.Object is the table index, so does not need to + * DDBHandle reference (from Load/load_table) is a special reference, + * it does not have a Reference.Object, so does not need to * increase the reference count */ - if (source_desc->reference.opcode == AML_LOAD_OP) { + if (source_desc->reference.class == ACPI_REFCLASS_TABLE) { break; }