diff options
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, | |||
250 | union acpi_operand_object **return_object_ptr) | 250 | union acpi_operand_object **return_object_ptr) |
251 | { | 251 | { |
252 | union acpi_operand_object *return_object = *return_object_ptr; | 252 | union acpi_operand_object *return_object = *return_object_ptr; |
253 | union acpi_operand_object **elements; | ||
254 | union acpi_operand_object *buffer_object; | 253 | union acpi_operand_object *buffer_object; |
255 | u8 *byte_buffer; | 254 | u8 *byte_buffer; |
256 | u32 *dword_buffer; | 255 | u32 *dword_buffer; |
257 | u32 count; | ||
258 | u32 i; | 256 | u32 i; |
259 | 257 | ||
260 | switch (return_object->common.type) { | 258 | switch (return_object->common.type) { |
@@ -302,47 +300,6 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data, | |||
302 | "Expanded Byte Buffer to expected DWord Buffer")); | 300 | "Expanded Byte Buffer to expected DWord Buffer")); |
303 | break; | 301 | break; |
304 | 302 | ||
305 | case ACPI_TYPE_PACKAGE: | ||
306 | |||
307 | /* All elements of the Package must be integers */ | ||
308 | |||
309 | elements = return_object->package.elements; | ||
310 | count = | ||
311 | ACPI_MIN(ACPI_FDE_FIELD_COUNT, | ||
312 | return_object->package.count); | ||
313 | |||
314 | for (i = 0; i < count; i++) { | ||
315 | if ((!*elements) || | ||
316 | ((*elements)->common.type != ACPI_TYPE_INTEGER)) { | ||
317 | return (AE_AML_OPERAND_TYPE); | ||
318 | } | ||
319 | elements++; | ||
320 | } | ||
321 | |||
322 | /* Create the new buffer object to replace the Package */ | ||
323 | |||
324 | buffer_object = | ||
325 | acpi_ut_create_buffer_object(ACPI_FDE_DWORD_BUFFER_SIZE); | ||
326 | if (!buffer_object) { | ||
327 | return (AE_NO_MEMORY); | ||
328 | } | ||
329 | |||
330 | /* Copy the package elements (integers) to the buffer */ | ||
331 | |||
332 | elements = return_object->package.elements; | ||
333 | dword_buffer = | ||
334 | ACPI_CAST_PTR(u32, buffer_object->buffer.pointer); | ||
335 | |||
336 | for (i = 0; i < count; i++) { | ||
337 | *dword_buffer = (u32) (*elements)->integer.value; | ||
338 | dword_buffer++; | ||
339 | elements++; | ||
340 | } | ||
341 | |||
342 | ACPI_INFO_PREDEFINED((AE_INFO, data->pathname, data->node_flags, | ||
343 | "Converted Package to expected Buffer")); | ||
344 | break; | ||
345 | |||
346 | default: | 303 | default: |
347 | return (AE_AML_OPERAND_TYPE); | 304 | return (AE_AML_OPERAND_TYPE); |
348 | } | 305 | } |