aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2008-11-13 11:25:22 +0800
committerLen Brown <len.brown@intel.com>2008-12-29 22:38:39 -0500
commit7a4b8131ac7b47feb110b3e0142d4207ee79a025 (patch)
tree7c5320446994efb6f8789d55baab2f7ba42b082f /drivers/acpi
parenteeb4437e63c39ce19cf9b2de36a1dddbf12910c4 (diff)
ACPICA: Enhance implicit return mechanism
For Windows compatibility, return an implicit integer of value zero for methods that have no executable code. A default implicit value of zero is provided for methods. Lin Ming. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/parser/psxface.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/acpi/parser/psxface.c b/drivers/acpi/parser/psxface.c
index 4985ce58c02..41b0c8c052a 100644
--- a/drivers/acpi/parser/psxface.c
+++ b/drivers/acpi/parser/psxface.c
@@ -295,6 +295,22 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
goto cleanup;
}
+ /*
+ * Start method evaluation with an implicit return of zero.
+ * This is done for Windows compatibility.
+ */
+ if (acpi_gbl_enable_interpreter_slack) {
+ walk_state->implicit_return_obj =
+ acpi_ut_create_internal_object(ACPI_TYPE_INTEGER);
+ if (!walk_state->implicit_return_obj) {
+ status = AE_NO_MEMORY;
+ acpi_ds_delete_walk_state(walk_state);
+ goto cleanup;
+ }
+
+ walk_state->implicit_return_obj->integer.value = 0;
+ }
+
/* Parse the AML */
status = acpi_ps_parse_aml(walk_state);