X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Facpi%2Facpica%2Fexstore.c;h=4ff37e8e0018f06c608e87f2fbcab1e7b7b537e2;hb=3f654bad3257427bea7ba1c4d43a23d99a03622b;hp=90431f12f8318e6fdb99d9dc06a6c338c8aa5850;hpb=4d1839138220e7e35bf9e31c854e4e0196dea7a1;p=karo-tx-linux.git diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c index 90431f12f831..4ff37e8e0018 100644 --- a/drivers/acpi/acpica/exstore.c +++ b/drivers/acpi/acpica/exstore.c @@ -487,14 +487,33 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc, default: ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Storing %s (%p) directly into node (%p) with no implicit conversion\n", + "Storing [%s] (%p) directly into node [%s] (%p)" + " with no implicit conversion\n", acpi_ut_get_object_type_name(source_desc), - source_desc, node)); + source_desc, + acpi_ut_get_object_type_name(target_desc), + node)); - /* No conversions for all other types. Just attach the source object */ + /* + * No conversions for all other types. Directly store a copy of + * the source object. NOTE: This is a departure from the ACPI + * spec, which states "If conversion is impossible, abort the + * running control method". + * + * This code implements "If conversion is impossible, treat the + * Store operation as a CopyObject". + */ + status = + acpi_ut_copy_iobject_to_iobject(source_desc, &new_desc, + walk_state); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } - status = acpi_ns_attach_object(node, source_desc, - source_desc->common.type); + status = + acpi_ns_attach_object(node, new_desc, + new_desc->common.type); + acpi_ut_remove_reference(new_desc); break; }