diff options
Diffstat (limited to 'drivers/acpi/acpica/utcopy.c')
-rw-r--r-- | drivers/acpi/acpica/utcopy.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c index 257221d452c8..ade8acf3f3a5 100644 --- a/drivers/acpi/acpica/utcopy.c +++ b/drivers/acpi/acpica/utcopy.c | |||
@@ -257,9 +257,9 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type, | |||
257 | ACPI_FUNCTION_ENTRY(); | 257 | ACPI_FUNCTION_ENTRY(); |
258 | 258 | ||
259 | this_index = state->pkg.index; | 259 | this_index = state->pkg.index; |
260 | target_object = (union acpi_object *) | 260 | target_object = (union acpi_object *)&((union acpi_object *) |
261 | &((union acpi_object *)(state->pkg.dest_object))->package. | 261 | (state->pkg.dest_object))-> |
262 | elements[this_index]; | 262 | package.elements[this_index]; |
263 | 263 | ||
264 | switch (object_type) { | 264 | switch (object_type) { |
265 | case ACPI_COPY_TYPE_SIMPLE: | 265 | case ACPI_COPY_TYPE_SIMPLE: |
@@ -348,15 +348,15 @@ acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object, | |||
348 | * Free space begins right after the first package | 348 | * Free space begins right after the first package |
349 | */ | 349 | */ |
350 | info.length = ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)); | 350 | info.length = ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)); |
351 | info.free_space = | 351 | info.free_space = buffer + |
352 | buffer + ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)); | 352 | ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)); |
353 | info.object_space = 0; | 353 | info.object_space = 0; |
354 | info.num_packages = 1; | 354 | info.num_packages = 1; |
355 | 355 | ||
356 | external_object->type = internal_object->common.type; | 356 | external_object->type = internal_object->common.type; |
357 | external_object->package.count = internal_object->package.count; | 357 | external_object->package.count = internal_object->package.count; |
358 | external_object->package.elements = ACPI_CAST_PTR(union acpi_object, | 358 | external_object->package.elements = |
359 | info.free_space); | 359 | ACPI_CAST_PTR(union acpi_object, info.free_space); |
360 | 360 | ||
361 | /* | 361 | /* |
362 | * Leave room for an array of ACPI_OBJECTS in the buffer | 362 | * Leave room for an array of ACPI_OBJECTS in the buffer |
@@ -593,8 +593,8 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, | |||
593 | package_elements = package_object->package.elements; | 593 | package_elements = package_object->package.elements; |
594 | 594 | ||
595 | /* | 595 | /* |
596 | * Recursive implementation. Probably ok, since nested external packages | 596 | * Recursive implementation. Probably ok, since nested external |
597 | * as parameters should be very rare. | 597 | * packages as parameters should be very rare. |
598 | */ | 598 | */ |
599 | for (i = 0; i < external_object->package.count; i++) { | 599 | for (i = 0; i < external_object->package.count; i++) { |
600 | status = | 600 | status = |
@@ -649,9 +649,8 @@ acpi_ut_copy_eobject_to_iobject(union acpi_object *external_object, | |||
649 | /* | 649 | /* |
650 | * Build a simple object (no nested objects) | 650 | * Build a simple object (no nested objects) |
651 | */ | 651 | */ |
652 | status = | 652 | status = acpi_ut_copy_esimple_to_isimple(external_object, |
653 | acpi_ut_copy_esimple_to_isimple(external_object, | 653 | internal_object); |
654 | internal_object); | ||
655 | } | 654 | } |
656 | 655 | ||
657 | return_ACPI_STATUS(status); | 656 | return_ACPI_STATUS(status); |