From: Bob Moore Date: Fri, 17 Aug 2012 02:30:28 +0000 (+0800) Subject: ACPICA: Enable Scope change to root during module-level code execution. X-Git-Tag: v3.7-rc1~89^2^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28f538b56d321dd5e027267f8240f06ce045e0aa;p=platform%2Fkernel%2Flinux-exynos.git ACPICA: Enable Scope change to root during module-level code execution. Allows constructs like this: If (XXXX) Scope (\) ... Signed-off-by: Bob Moore Signed-off-by: Feng Tang Signed-off-by: Len Brown --- diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c index 552aa3a..5575100 100644 --- a/drivers/acpi/acpica/dswload.c +++ b/drivers/acpi/acpica/dswload.c @@ -230,6 +230,20 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, walk_state->scope_info->common.value = ACPI_TYPE_ANY; break; + case ACPI_TYPE_METHOD: + + /* + * Allow scope change to root during execution of module-level + * code. Root is typed METHOD during this time. + */ + if ((node == acpi_gbl_root_node) && + (walk_state-> + parse_flags & ACPI_PARSE_MODULE_LEVEL)) { + break; + } + + /*lint -fallthrough */ + default: /* All other types are an error */ diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c index ae71477..89c0114 100644 --- a/drivers/acpi/acpica/dswload2.c +++ b/drivers/acpi/acpica/dswload2.c @@ -230,6 +230,20 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, walk_state->scope_info->common.value = ACPI_TYPE_ANY; break; + case ACPI_TYPE_METHOD: + + /* + * Allow scope change to root during execution of module-level + * code. Root is typed METHOD during this time. + */ + if ((node == acpi_gbl_root_node) && + (walk_state-> + parse_flags & ACPI_PARSE_MODULE_LEVEL)) { + break; + } + + /*lint -fallthrough */ + default: /* All other types are an error */