From 188fef1d668adb5e386567a38bbd5993122e7682 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 2 Feb 2007 19:48:18 +0300 Subject: [PATCH] --- yaml --- r: 46345 b: refs/heads/master c: 9c52657a2ac8aac5149e11049497b10918e1f58f h: refs/heads/master i: 46343: 642a9e18bca220d35c7eb75511ee6fead5528622 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/dispatcher/dsfield.c | 30 +++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 079a8472374e..a3fe53735d8f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6b366e2fe1b68bd9af55caf166eaaf0609ba18a9 +refs/heads/master: 9c52657a2ac8aac5149e11049497b10918e1f58f diff --git a/trunk/drivers/acpi/dispatcher/dsfield.c b/trunk/drivers/acpi/dispatcher/dsfield.c index a6d77efb41a0..379dd71f55eb 100644 --- a/trunk/drivers/acpi/dispatcher/dsfield.c +++ b/trunk/drivers/acpi/dispatcher/dsfield.c @@ -133,7 +133,8 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op, } } - /* We could put the returned object (Node) on the object stack for later, + /* + * We could put the returned object (Node) on the object stack for later, * but for now, we will put it in the "op" object that the parser uses, * so we can get it again at the end of this scope */ @@ -514,8 +515,33 @@ acpi_ds_create_bank_field(union acpi_parse_object *op, /* Third arg is the bank_value */ + /* TBD: This arg is a term_arg, not a constant, and must be evaluated */ + arg = arg->common.next; - info.bank_value = (u32) arg->common.value.integer; + + /* Currently, only the following constants are supported */ + + switch (arg->common.aml_opcode) { + case AML_ZERO_OP: + info.bank_value = 0; + break; + + case AML_ONE_OP: + info.bank_value = 1; + break; + + case AML_BYTE_OP: + case AML_WORD_OP: + case AML_DWORD_OP: + case AML_QWORD_OP: + info.bank_value = (u32) arg->common.value.integer; + break; + + default: + info.bank_value = 0; + ACPI_ERROR((AE_INFO, + "Non-constant BankValue for BankField is not implemented")); + } /* Fourth arg is the field flags */