]> err.no Git - linux-2.6/commitdiff
ACPICA: Fixed a problem with Index references passed as method arguments
authorLin Ming <ming.m.lin@intel.com>
Thu, 10 Apr 2008 15:06:41 +0000 (19:06 +0400)
committerLen Brown <len.brown@intel.com>
Tue, 22 Apr 2008 18:29:27 +0000 (14:29 -0400)
References passed as arguments to control methods were dereferenced
immediately (before control was passed to the called method). The
references are now correctly passed directly to the called
method.

http://bugzilla.kernel.org/show_bug.cgi?id=5389

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/executer/exresolv.c

index 74ab220a5924b47fb6cb97f3c28a3c775700e206..795ec8c7363c90d0a9bec63b85c8e4055d88d3e6 100644 (file)
@@ -194,6 +194,12 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
 
                        case ACPI_TYPE_PACKAGE:
 
+                               /* If method call - leave the Reference on the stack */
+
+                               if (walk_state->opcode == AML_INT_METHODCALL_OP) {
+                                       break;
+                               }
+
                                obj_desc = *stack_desc->reference.where;
                                if (obj_desc) {
                                        /*
@@ -210,7 +216,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
                                         * the package, can't dereference it
                                         */
                                        ACPI_ERROR((AE_INFO,
-                                                   "Attempt to deref an Index to NULL pkg element Idx=%p",
+                                                   "Attempt to dereference an Index to NULL package element Idx=%p",
                                                    stack_desc));
                                        status = AE_AML_UNINITIALIZED_ELEMENT;
                                }
@@ -221,7 +227,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
                                /* Invalid reference object */
 
                                ACPI_ERROR((AE_INFO,
-                                           "Unknown TargetType %X in Index/Reference obj %p",
+                                           "Unknown TargetType %X in Index/Reference object %p",
                                            stack_desc->reference.target_type,
                                            stack_desc));
                                status = AE_AML_INTERNAL;