ACPICA: Update acpi_buffer_to_resource interface.
authorBob Moore <robert.moore@intel.com>
Wed, 30 Apr 2014 02:03:58 +0000 (10:03 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 6 May 2014 22:55:00 +0000 (00:55 +0200)
1) Add standard trace mechanism.
2) Add ACPI_EXPORT_SYMBOL macro.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/rscreate.c

index 75d3690506570d824d4d25d1280c48bdbbe6731f..049d9c22a0f9616824451d0beb29823c4b5ac59f 100644 (file)
@@ -72,6 +72,8 @@ acpi_buffer_to_resource(u8 *aml_buffer,
        void *resource;
        void *current_resource_ptr;
 
+       ACPI_FUNCTION_TRACE(acpi_buffer_to_resource);
+
        /*
         * Note: we allow AE_AML_NO_RESOURCE_END_TAG, since an end tag
         * is not required here.
@@ -85,7 +87,7 @@ acpi_buffer_to_resource(u8 *aml_buffer,
                status = AE_OK;
        }
        if (ACPI_FAILURE(status)) {
-               return (status);
+               return_ACPI_STATUS(status);
        }
 
        /* Allocate a buffer for the converted resource */
@@ -93,7 +95,7 @@ acpi_buffer_to_resource(u8 *aml_buffer,
        resource = ACPI_ALLOCATE_ZEROED(list_size_needed);
        current_resource_ptr = resource;
        if (!resource) {
-               return (AE_NO_MEMORY);
+               return_ACPI_STATUS(AE_NO_MEMORY);
        }
 
        /* Perform the AML-to-Resource conversion */
@@ -110,9 +112,11 @@ acpi_buffer_to_resource(u8 *aml_buffer,
                *resource_ptr = resource;
        }
 
-       return (status);
+       return_ACPI_STATUS(status);
 }
 
+ACPI_EXPORT_SYMBOL(acpi_buffer_to_resource)
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_rs_create_resource_list
@@ -130,10 +134,9 @@ acpi_buffer_to_resource(u8 *aml_buffer,
  *              of device resources.
  *
  ******************************************************************************/
-
 acpi_status
 acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer,
-                            struct acpi_buffer * output_buffer)
+                            struct acpi_buffer *output_buffer)
 {
 
        acpi_status status;