aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/parser/pstree.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/parser/pstree.c')
-rw-r--r--drivers/acpi/parser/pstree.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c
index dd6f16726fc4..0015717ef096 100644
--- a/drivers/acpi/parser/pstree.c
+++ b/drivers/acpi/parser/pstree.c
@@ -77,6 +77,7 @@ union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn)
77 77
78 op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); 78 op_info = acpi_ps_get_opcode_info(op->common.aml_opcode);
79 if (op_info->class == AML_CLASS_UNKNOWN) { 79 if (op_info->class == AML_CLASS_UNKNOWN) {
80
80 /* Invalid opcode or ASCII character */ 81 /* Invalid opcode or ASCII character */
81 82
82 return (NULL); 83 return (NULL);
@@ -85,6 +86,7 @@ union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn)
85 /* Check if this opcode requires argument sub-objects */ 86 /* Check if this opcode requires argument sub-objects */
86 87
87 if (!(op_info->flags & AML_HAS_ARGS)) { 88 if (!(op_info->flags & AML_HAS_ARGS)) {
89
88 /* Has no linked argument objects */ 90 /* Has no linked argument objects */
89 91
90 return (NULL); 92 return (NULL);
@@ -130,6 +132,7 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg)
130 132
131 op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); 133 op_info = acpi_ps_get_opcode_info(op->common.aml_opcode);
132 if (op_info->class == AML_CLASS_UNKNOWN) { 134 if (op_info->class == AML_CLASS_UNKNOWN) {
135
133 /* Invalid opcode */ 136 /* Invalid opcode */
134 137
135 ACPI_ERROR((AE_INFO, "Invalid AML Opcode: 0x%2.2X", 138 ACPI_ERROR((AE_INFO, "Invalid AML Opcode: 0x%2.2X",
@@ -140,6 +143,7 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg)
140 /* Check if this opcode requires argument sub-objects */ 143 /* Check if this opcode requires argument sub-objects */
141 144
142 if (!(op_info->flags & AML_HAS_ARGS)) { 145 if (!(op_info->flags & AML_HAS_ARGS)) {
146
143 /* Has no linked argument objects */ 147 /* Has no linked argument objects */
144 148
145 return; 149 return;
@@ -148,6 +152,7 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg)
148 /* Append the argument to the linked argument list */ 152 /* Append the argument to the linked argument list */
149 153
150 if (op->common.value.arg) { 154 if (op->common.value.arg) {
155
151 /* Append to existing argument list */ 156 /* Append to existing argument list */
152 157
153 prev_arg = op->common.value.arg; 158 prev_arg = op->common.value.arg;
@@ -222,12 +227,14 @@ union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin,
222 } 227 }
223 228
224 if (arg == origin) { 229 if (arg == origin) {
230
225 /* Reached parent of origin, end search */ 231 /* Reached parent of origin, end search */
226 232
227 return (NULL); 233 return (NULL);
228 } 234 }
229 235
230 if (parent->common.next) { 236 if (parent->common.next) {
237
231 /* Found sibling of parent */ 238 /* Found sibling of parent */
232 239
233 return (parent->common.next); 240 return (parent->common.next);
@@ -299,5 +306,4 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op)
299 return (child); 306 return (child);
300} 307}
301#endif 308#endif
302
303#endif /* ACPI_FUTURE_USAGE */ 309#endif /* ACPI_FUTURE_USAGE */