Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c52657a2ac8aac5149e11049497b10918e1f58f Commit: 9c52657a2ac8aac5149e11049497b10918e1f58f Parent: 6b366e2fe1b68bd9af55caf166eaaf0609ba18a9 Author: Bob Moore <[EMAIL PROTECTED]> AuthorDate: Fri Feb 2 19:48:18 2007 +0300 Committer: Len Brown <[EMAIL PROTECTED]> CommitDate: Fri Feb 2 21:14:21 2007 -0500
ACPICA: Temporary fix for BankValue parameter Temporary fix for BankValue parameter of a Bank Field to support all constant values, including Zero and One. Must eventually be converted to a full TermArg evaluation. Signed-off-by: Alexey Starikovskiy <[EMAIL PROTECTED]> Signed-off-by: Len Brown <[EMAIL PROTECTED]> --- drivers/acpi/dispatcher/dsfield.c | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c index a6d77ef..379dd71 100644 --- a/drivers/acpi/dispatcher/dsfield.c +++ b/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 */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html