diff options
author | Bob Moore <robert.moore@intel.com> | 2009-12-11 15:18:52 +0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-15 17:29:36 -0500 |
commit | ea7c5ec148044776d5e134e52a3e1aca8d662dbe (patch) | |
tree | f1f37cf9b22ea9e48c5b90f1842cfef5a9275111 /drivers/acpi/acpica/nsrepair2.c | |
parent | d97659112044c0c77b93c6199eee7ee884eb3cca (diff) | |
download | linux-ea7c5ec148044776d5e134e52a3e1aca8d662dbe.tar.bz2 |
ACPICA: Move Package-to-Buffer repair code into common ToBuffer function
Move code specific to _FDE and _GTM into the generic repair code.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nsrepair2.c')
-rw-r--r-- | drivers/acpi/acpica/nsrepair2.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c index 6c35b57a7fd0..846df7047a81 100644 --- a/drivers/acpi/acpica/nsrepair2.c +++ b/drivers/acpi/acpica/nsrepair2.c @@ -250,11 +250,9 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data, union acpi_operand_object **return_object_ptr) { union acpi_operand_object *return_object = *return_object_ptr; - union acpi_operand_object **elements; union acpi_operand_object *buffer_object; u8 *byte_buffer; u32 *dword_buffer; - u32 count; u32 i; switch (return_object->common.type) { @@ -302,47 +300,6 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data, "Expanded Byte Buffer to expected DWord Buffer")); break; - case ACPI_TYPE_PACKAGE: - - /* All elements of the Package must be integers */ - - elements = return_object->package.elements; - count = - ACPI_MIN(ACPI_FDE_FIELD_COUNT, - return_object->package.count); - - for (i = 0; i < count; i++) { - if ((!*elements) || - ((*elements)->common.type != ACPI_TYPE_INTEGER)) { - return (AE_AML_OPERAND_TYPE); - } - elements++; - } - - /* Create the new buffer object to replace the Package */ - - buffer_object = - acpi_ut_create_buffer_object(ACPI_FDE_DWORD_BUFFER_SIZE); - if (!buffer_object) { - return (AE_NO_MEMORY); - } - - /* Copy the package elements (integers) to the buffer */ - - elements = return_object->package.elements; - dword_buffer = - ACPI_CAST_PTR(u32, buffer_object->buffer.pointer); - - for (i = 0; i < count; i++) { - *dword_buffer = (u32) (*elements)->integer.value; - dword_buffer++; - elements++; - } - - ACPI_INFO_PREDEFINED((AE_INFO, data->pathname, data->node_flags, - "Converted Package to expected Buffer")); - break; - default: return (AE_AML_OPERAND_TYPE); } |