aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utcopy.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-02-18 01:44:03 -0500
committerLen Brown <len.brown@intel.com>2009-03-26 16:38:27 -0400
commit3371c19c294a4cb3649aa4e84606be8a1d999e61 (patch)
tree6201f4f821cea0efece26658b88ea3f35810e169 /drivers/acpi/acpica/utcopy.c
parent32c9ef994d91352b710b948ec369cd18d6bca51b (diff)
ACPICA: Remove ACPI_GET_OBJECT_TYPE macro
Remove all instances of this obsolete macro, since it is now a simple reference to ->common.type. There were about 150 invocations of the macro across 41 files. ACPICA BZ 755. http://www.acpica.org/bugzilla/show_bug.cgi?id=755 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utcopy.c')
-rw-r--r--drivers/acpi/acpica/utcopy.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index b0dcfd3c872a..cabe860ce007 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -135,11 +135,11 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
135 * In general, the external object will be the same type as 135 * In general, the external object will be the same type as
136 * the internal object 136 * the internal object
137 */ 137 */
138 external_object->type = ACPI_GET_OBJECT_TYPE(internal_object); 138 external_object->type = internal_object->common.type;
139 139
140 /* However, only a limited number of external types are supported */ 140 /* However, only a limited number of external types are supported */
141 141
142 switch (ACPI_GET_OBJECT_TYPE(internal_object)) { 142 switch (internal_object->common.type) {
143 case ACPI_TYPE_STRING: 143 case ACPI_TYPE_STRING:
144 144
145 external_object->string.pointer = (char *)data_space; 145 external_object->string.pointer = (char *)data_space;
@@ -222,8 +222,8 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
222 */ 222 */
223 ACPI_ERROR((AE_INFO, 223 ACPI_ERROR((AE_INFO,
224 "Unsupported object type, cannot convert to external object: %s", 224 "Unsupported object type, cannot convert to external object: %s",
225 acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE 225 acpi_ut_get_type_name(internal_object->common.
226 (internal_object)))); 226 type)));
227 227
228 return_ACPI_STATUS(AE_SUPPORT); 228 return_ACPI_STATUS(AE_SUPPORT);
229 } 229 }
@@ -355,7 +355,7 @@ acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object,
355 info.object_space = 0; 355 info.object_space = 0;
356 info.num_packages = 1; 356 info.num_packages = 1;
357 357
358 external_object->type = ACPI_GET_OBJECT_TYPE(internal_object); 358 external_object->type = internal_object->common.type;
359 external_object->package.count = internal_object->package.count; 359 external_object->package.count = internal_object->package.count;
360 external_object->package.elements = ACPI_CAST_PTR(union acpi_object, 360 external_object->package.elements = ACPI_CAST_PTR(union acpi_object,
361 info.free_space); 361 info.free_space);
@@ -399,7 +399,7 @@ acpi_ut_copy_iobject_to_eobject(union acpi_operand_object *internal_object,
399 399
400 ACPI_FUNCTION_TRACE(ut_copy_iobject_to_eobject); 400 ACPI_FUNCTION_TRACE(ut_copy_iobject_to_eobject);
401 401
402 if (ACPI_GET_OBJECT_TYPE(internal_object) == ACPI_TYPE_PACKAGE) { 402 if (internal_object->common.type == ACPI_TYPE_PACKAGE) {
403 /* 403 /*
404 * Package object: Copy all subobjects (including 404 * Package object: Copy all subobjects (including
405 * nested packages) 405 * nested packages)
@@ -697,7 +697,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
697 697
698 /* Handle the objects with extra data */ 698 /* Handle the objects with extra data */
699 699
700 switch (ACPI_GET_OBJECT_TYPE(dest_desc)) { 700 switch (dest_desc->common.type) {
701 case ACPI_TYPE_BUFFER: 701 case ACPI_TYPE_BUFFER:
702 /* 702 /*
703 * Allocate and copy the actual buffer if and only if: 703 * Allocate and copy the actual buffer if and only if:
@@ -814,8 +814,8 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,
814 * This is a simple object, just copy it 814 * This is a simple object, just copy it
815 */ 815 */
816 target_object = 816 target_object =
817 acpi_ut_create_internal_object(ACPI_GET_OBJECT_TYPE 817 acpi_ut_create_internal_object(source_object->
818 (source_object)); 818 common.type);
819 if (!target_object) { 819 if (!target_object) {
820 return (AE_NO_MEMORY); 820 return (AE_NO_MEMORY);
821 } 821 }
@@ -892,7 +892,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,
892 892
893 ACPI_FUNCTION_TRACE(ut_copy_ipackage_to_ipackage); 893 ACPI_FUNCTION_TRACE(ut_copy_ipackage_to_ipackage);
894 894
895 dest_obj->common.type = ACPI_GET_OBJECT_TYPE(source_obj); 895 dest_obj->common.type = source_obj->common.type;
896 dest_obj->common.flags = source_obj->common.flags; 896 dest_obj->common.flags = source_obj->common.flags;
897 dest_obj->package.count = source_obj->package.count; 897 dest_obj->package.count = source_obj->package.count;
898 898
@@ -950,15 +950,14 @@ acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc,
950 950
951 /* Create the top level object */ 951 /* Create the top level object */
952 952
953 *dest_desc = 953 *dest_desc = acpi_ut_create_internal_object(source_desc->common.type);
954 acpi_ut_create_internal_object(ACPI_GET_OBJECT_TYPE(source_desc));
955 if (!*dest_desc) { 954 if (!*dest_desc) {
956 return_ACPI_STATUS(AE_NO_MEMORY); 955 return_ACPI_STATUS(AE_NO_MEMORY);
957 } 956 }
958 957
959 /* Copy the object and possible subobjects */ 958 /* Copy the object and possible subobjects */
960 959
961 if (ACPI_GET_OBJECT_TYPE(source_desc) == ACPI_TYPE_PACKAGE) { 960 if (source_desc->common.type == ACPI_TYPE_PACKAGE) {
962 status = 961 status =
963 acpi_ut_copy_ipackage_to_ipackage(source_desc, *dest_desc, 962 acpi_ut_copy_ipackage_to_ipackage(source_desc, *dest_desc,
964 walk_state); 963 walk_state);