*****************************************************************************/
/*
- * 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
{
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);
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
* 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;
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: