From 95865997c00bb67fe7b302bec4e9844275f829d2 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Mon, 31 Dec 2012 00:11:45 +0000 Subject: [PATCH] --- yaml --- r: 350897 b: refs/heads/master c: 3f654bad3257427bea7ba1c4d43a23d99a03622b h: refs/heads/master i: 350895: 4254e6218edf60347b442f328fd8529d27a66b81 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/acpica/exstore.c | 29 ++++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index ee128a68544e..a87d4795b651 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9cea6249c9154a7d0b322a226261697f947692ad +refs/heads/master: 3f654bad3257427bea7ba1c4d43a23d99a03622b diff --git a/trunk/drivers/acpi/acpica/exstore.c b/trunk/drivers/acpi/acpica/exstore.c index 90431f12f831..4ff37e8e0018 100644 --- a/trunk/drivers/acpi/acpica/exstore.c +++ b/trunk/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; }