]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPICA: Enable Scope change to root during module-level code execution.
authorBob Moore <robert.moore@intel.com>
Fri, 17 Aug 2012 02:30:28 +0000 (10:30 +0800)
committerLen Brown <len.brown@intel.com>
Fri, 21 Sep 2012 04:26:16 +0000 (00:26 -0400)
Allows constructs like this:
    If (XXXX)
        Scope (\)
        ...

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/acpica/dswload.c
drivers/acpi/acpica/dswload2.c

index 552aa3a50c84882ce9c9aa152d1b231bf7f6cd20..557510084c7aca459fb24ace485dd89c98aa26bc 100644 (file)
@@ -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 */
index ae71477247631074fcc627b1345e307e77b334a9..89c0114210c0f32e0a3f7edf3e3d1961aa4e4a5f 100644 (file)
@@ -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 */