diff options
author | Bob Moore <robert.moore@intel.com> | 2008-04-10 11:06:39 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-22 14:29:24 -0400 |
commit | 53cf174409a24e8388e1d554d27436275fc81fe7 (patch) | |
tree | 52883d192ba1b4bd978a8ca9d30af1e533679e70 /drivers/acpi/executer | |
parent | 1c12a7dde1752f2c40fe170cabff463a0b362720 (diff) |
ACPICA: Fix for Alias operator to see target child objects
Fixed a problem with the Alias operator when the target of the
alias is a named ASL operator that opens a new scope -- Scope,
Device, PowerResource, Processor, and ThermalZone. In these cases,
any children of the original operator could not be accessed via
the alias, potentially causing unexpected AE_NOT_FOUND exceptions.
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>
Diffstat (limited to 'drivers/acpi/executer')
-rw-r--r-- | drivers/acpi/executer/excreate.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c index 6e9a23e47fef..b3914395851b 100644 --- a/drivers/acpi/executer/excreate.c +++ b/drivers/acpi/executer/excreate.c | |||
@@ -96,6 +96,9 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state) | |||
96 | * to the original Node. | 96 | * to the original Node. |
97 | */ | 97 | */ |
98 | switch (target_node->type) { | 98 | switch (target_node->type) { |
99 | |||
100 | /* For these types, the sub-object can change dynamically via a Store */ | ||
101 | |||
99 | case ACPI_TYPE_INTEGER: | 102 | case ACPI_TYPE_INTEGER: |
100 | case ACPI_TYPE_STRING: | 103 | case ACPI_TYPE_STRING: |
101 | case ACPI_TYPE_BUFFER: | 104 | case ACPI_TYPE_BUFFER: |
@@ -103,9 +106,18 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state) | |||
103 | case ACPI_TYPE_BUFFER_FIELD: | 106 | case ACPI_TYPE_BUFFER_FIELD: |
104 | 107 | ||
105 | /* | 108 | /* |
109 | * These types open a new scope, so we need the NS node in order to access | ||
110 | * any children. | ||
111 | */ | ||
112 | case ACPI_TYPE_DEVICE: | ||
113 | case ACPI_TYPE_POWER: | ||
114 | case ACPI_TYPE_PROCESSOR: | ||
115 | case ACPI_TYPE_THERMAL: | ||
116 | case ACPI_TYPE_LOCAL_SCOPE: | ||
117 | |||
118 | /* | ||
106 | * The new alias has the type ALIAS and points to the original | 119 | * The new alias has the type ALIAS and points to the original |
107 | * NS node, not the object itself. This is because for these | 120 | * NS node, not the object itself. |
108 | * types, the object can change dynamically via a Store. | ||
109 | */ | 121 | */ |
110 | alias_node->type = ACPI_TYPE_LOCAL_ALIAS; | 122 | alias_node->type = ACPI_TYPE_LOCAL_ALIAS; |
111 | alias_node->object = | 123 | alias_node->object = |
@@ -115,9 +127,7 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state) | |||
115 | case ACPI_TYPE_METHOD: | 127 | case ACPI_TYPE_METHOD: |
116 | 128 | ||
117 | /* | 129 | /* |
118 | * The new alias has the type ALIAS and points to the original | 130 | * Control method aliases need to be differentiated |
119 | * NS node, not the object itself. This is because for these | ||
120 | * types, the object can change dynamically via a Store. | ||
121 | */ | 131 | */ |
122 | alias_node->type = ACPI_TYPE_LOCAL_METHOD_ALIAS; | 132 | alias_node->type = ACPI_TYPE_LOCAL_METHOD_ALIAS; |
123 | alias_node->object = | 133 | alias_node->object = |