X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Facpi%2Fexecuter%2Fexstoren.c;h=e663a48f8a1cb6d581f1aef4b6852926bb75170a;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=6ddb1e0739359daa00e8a184987694854263e7de;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c index 6ddb1e073..e663a48f8 100644 --- a/drivers/acpi/executer/exstoren.c +++ b/drivers/acpi/executer/exstoren.c @@ -7,7 +7,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2004, R. Byron Moore + * Copyright (C) 2000 - 2005, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -206,6 +206,7 @@ acpi_ex_store_object_to_object ( { union acpi_operand_object *actual_src_desc; acpi_status status = AE_OK; + acpi_object_type original_src_type; ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_object", source_desc); @@ -222,7 +223,8 @@ acpi_ex_store_object_to_object ( return_ACPI_STATUS (status); } - if (ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_GET_OBJECT_TYPE (dest_desc)) { + original_src_type = ACPI_GET_OBJECT_TYPE (source_desc); + if (original_src_type != ACPI_GET_OBJECT_TYPE (dest_desc)) { /* * The source type does not match the type of the destination. * Perform the "implicit conversion" of the source to the current type @@ -232,15 +234,15 @@ acpi_ex_store_object_to_object ( * Otherwise, actual_src_desc is a temporary object to hold the * converted object. */ - status = acpi_ex_convert_to_target_type (ACPI_GET_OBJECT_TYPE (dest_desc), source_desc, - &actual_src_desc, walk_state); + status = acpi_ex_convert_to_target_type (ACPI_GET_OBJECT_TYPE (dest_desc), + source_desc, &actual_src_desc, walk_state); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } if (source_desc == actual_src_desc) { /* - * No conversion was performed. Return the source_desc as the + * No conversion was performed. Return the source_desc as the * new object. */ *new_desc = source_desc; @@ -269,12 +271,18 @@ acpi_ex_store_object_to_object ( case ACPI_TYPE_BUFFER: - status = acpi_ex_store_buffer_to_buffer (actual_src_desc, dest_desc); + /* + * Note: There is different store behavior depending on the original + * source type + */ + status = acpi_ex_store_buffer_to_buffer (original_src_type, actual_src_desc, + dest_desc); break; case ACPI_TYPE_PACKAGE: - status = acpi_ut_copy_iobject_to_iobject (actual_src_desc, &dest_desc, walk_state); + status = acpi_ut_copy_iobject_to_iobject (actual_src_desc, &dest_desc, + walk_state); break; default: