From bbfd87f7def705551afb5afabe00bbcdaf76b4b3 Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Thu, 13 Nov 2008 11:25:22 +0800 Subject: [PATCH] --- yaml --- r: 128035 b: refs/heads/master c: 7a4b8131ac7b47feb110b3e0142d4207ee79a025 h: refs/heads/master i: 128033: 53117793a9f7c8c9a184d64b0d4ec84970bbf7f1 128031: 17f11d85d69b3080a2a6c0e1c2da2f9ce7d6d5c6 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/parser/psxface.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f6bdd2ade9da..bf1e2a7ce11b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eeb4437e63c39ce19cf9b2de36a1dddbf12910c4 +refs/heads/master: 7a4b8131ac7b47feb110b3e0142d4207ee79a025 diff --git a/trunk/drivers/acpi/parser/psxface.c b/trunk/drivers/acpi/parser/psxface.c index 4985ce58c024..41b0c8c052a8 100644 --- a/trunk/drivers/acpi/parser/psxface.c +++ b/trunk/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);