aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/parser/psloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/parser/psloop.c')
-rw-r--r--drivers/acpi/parser/psloop.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c
index a079975f671f..a7c768860648 100644
--- a/drivers/acpi/parser/psloop.c
+++ b/drivers/acpi/parser/psloop.c
@@ -325,6 +325,15 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state,
325 op->named.length = 0; 325 op->named.length = 0;
326 } 326 }
327 327
328 if (walk_state->opcode == AML_BANK_FIELD_OP) {
329 /*
330 * Backup to beginning of bank_field declaration
331 * body_length is unknown until we parse the body
332 */
333 op->named.data = aml_op_start;
334 op->named.length = 0;
335 }
336
328 parent_scope = acpi_ps_get_parent_scope(&(walk_state->parser_state)); 337 parent_scope = acpi_ps_get_parent_scope(&(walk_state->parser_state));
329 acpi_ps_append_arg(parent_scope, op); 338 acpi_ps_append_arg(parent_scope, op);
330 339
@@ -1040,6 +1049,16 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
1040 (u32) (parser_state->aml - op->named.data); 1049 (u32) (parser_state->aml - op->named.data);
1041 } 1050 }
1042 1051
1052 if (op->common.aml_opcode == AML_BANK_FIELD_OP) {
1053 /*
1054 * Backup to beginning of bank_field declaration
1055 *
1056 * body_length is unknown until we parse the body
1057 */
1058 op->named.length =
1059 (u32) (parser_state->aml - op->named.data);
1060 }
1061
1043 /* This op complete, notify the dispatcher */ 1062 /* This op complete, notify the dispatcher */
1044 1063
1045 if (walk_state->ascending_callback != NULL) { 1064 if (walk_state->ascending_callback != NULL) {