ACPI: Change ACPI to use dev_archdata instead of firmware_data
[powerpc.git] / drivers / acpi / dispatcher / dsfield.c
index f3a008f..a6d77ef 100644 (file)
@@ -87,7 +87,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
        union acpi_operand_object *second_desc = NULL;
        u32 flags;
 
-       ACPI_FUNCTION_TRACE("ds_create_buffer_field");
+       ACPI_FUNCTION_TRACE(ds_create_buffer_field);
 
        /* Get the name_string argument */
 
@@ -128,7 +128,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
                                   ACPI_IMODE_LOAD_PASS1, flags, walk_state,
                                   &(node));
                if (ACPI_FAILURE(status)) {
-                       ACPI_REPORT_NSERROR(arg->common.value.string, status);
+                       ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
                        return_ACPI_STATUS(status);
                }
        }
@@ -210,7 +210,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
        acpi_status status;
        acpi_integer position;
 
-       ACPI_FUNCTION_TRACE_PTR("ds_get_field_names", info);
+       ACPI_FUNCTION_TRACE_PTR(ds_get_field_names, info);
 
        /* First field starts at bit zero */
 
@@ -232,7 +232,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
                            + (acpi_integer) arg->common.value.size;
 
                        if (position > ACPI_UINT32_MAX) {
-                               ACPI_REPORT_ERROR(("Bit offset within field too large (> 0xFFFFFFFF)\n"));
+                               ACPI_ERROR((AE_INFO,
+                                           "Bit offset within field too large (> 0xFFFFFFFF)"));
                                return_ACPI_STATUS(AE_SUPPORT);
                        }
 
@@ -268,8 +269,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
                                                ACPI_NS_DONT_OPEN_SCOPE,
                                                walk_state, &info->field_node);
                        if (ACPI_FAILURE(status)) {
-                               ACPI_REPORT_NSERROR((char *)&arg->named.name,
-                                                   status);
+                               ACPI_ERROR_NAMESPACE((char *)&arg->named.name,
+                                                    status);
                                if (status != AE_ALREADY_EXISTS) {
                                        return_ACPI_STATUS(status);
                                }
@@ -293,7 +294,11 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
                            + (acpi_integer) arg->common.value.size;
 
                        if (position > ACPI_UINT32_MAX) {
-                               ACPI_REPORT_ERROR(("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", ACPI_CAST_PTR(char, &info->field_node->name)));
+                               ACPI_ERROR((AE_INFO,
+                                           "Field [%4.4s] bit offset too large (> 0xFFFFFFFF)",
+                                           ACPI_CAST_PTR(char,
+                                                         &info->field_node->
+                                                         name)));
                                return_ACPI_STATUS(AE_SUPPORT);
                        }
 
@@ -302,8 +307,9 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
 
                default:
 
-                       ACPI_REPORT_ERROR(("Invalid opcode in field list: %X\n",
-                                          arg->common.aml_opcode));
+                       ACPI_ERROR((AE_INFO,
+                                   "Invalid opcode in field list: %X",
+                                   arg->common.aml_opcode));
                        return_ACPI_STATUS(AE_AML_BAD_OPCODE);
                }
 
@@ -336,7 +342,7 @@ acpi_ds_create_field(union acpi_parse_object *op,
        union acpi_parse_object *arg;
        struct acpi_create_field_info info;
 
-       ACPI_FUNCTION_TRACE_PTR("ds_create_field", op);
+       ACPI_FUNCTION_TRACE_PTR(ds_create_field, op);
 
        /* First arg is the name of the parent op_region (must already exist) */
 
@@ -348,7 +354,7 @@ acpi_ds_create_field(union acpi_parse_object *op,
                                   ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
                                   walk_state, &region_node);
                if (ACPI_FAILURE(status)) {
-                       ACPI_REPORT_NSERROR(arg->common.value.name, status);
+                       ACPI_ERROR_NAMESPACE(arg->common.value.name, status);
                        return_ACPI_STATUS(status);
                }
        }
@@ -393,7 +399,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
        struct acpi_namespace_node *node;
        u8 type = 0;
 
-       ACPI_FUNCTION_TRACE_PTR("ds_init_field_objects", op);
+       ACPI_FUNCTION_TRACE_PTR(ds_init_field_objects, op);
 
        switch (walk_state->opcode) {
        case AML_FIELD_OP:
@@ -419,6 +425,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
         * Walk the list of entries in the field_list
         */
        while (arg) {
+
                /* Ignore OFFSET and ACCESSAS terms here */
 
                if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) {
@@ -430,8 +437,8 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
                                                ACPI_NS_ERROR_IF_FOUND,
                                                walk_state, &node);
                        if (ACPI_FAILURE(status)) {
-                               ACPI_REPORT_NSERROR((char *)&arg->named.name,
-                                                   status);
+                               ACPI_ERROR_NAMESPACE((char *)&arg->named.name,
+                                                    status);
                                if (status != AE_ALREADY_EXISTS) {
                                        return_ACPI_STATUS(status);
                                }
@@ -475,7 +482,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
        union acpi_parse_object *arg;
        struct acpi_create_field_info info;
 
-       ACPI_FUNCTION_TRACE_PTR("ds_create_bank_field", op);
+       ACPI_FUNCTION_TRACE_PTR(ds_create_bank_field, op);
 
        /* First arg is the name of the parent op_region (must already exist) */
 
@@ -487,7 +494,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
                                   ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
                                   walk_state, &region_node);
                if (ACPI_FAILURE(status)) {
-                       ACPI_REPORT_NSERROR(arg->common.value.name, status);
+                       ACPI_ERROR_NAMESPACE(arg->common.value.name, status);
                        return_ACPI_STATUS(status);
                }
        }
@@ -501,7 +508,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
                           ACPI_NS_SEARCH_PARENT, walk_state,
                           &info.register_node);
        if (ACPI_FAILURE(status)) {
-               ACPI_REPORT_NSERROR(arg->common.value.string, status);
+               ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
                return_ACPI_STATUS(status);
        }
 
@@ -548,7 +555,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
        union acpi_parse_object *arg;
        struct acpi_create_field_info info;
 
-       ACPI_FUNCTION_TRACE_PTR("ds_create_index_field", op);
+       ACPI_FUNCTION_TRACE_PTR(ds_create_index_field, op);
 
        /* First arg is the name of the Index register (must already exist) */
 
@@ -559,7 +566,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
                           ACPI_NS_SEARCH_PARENT, walk_state,
                           &info.register_node);
        if (ACPI_FAILURE(status)) {
-               ACPI_REPORT_NSERROR(arg->common.value.string, status);
+               ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
                return_ACPI_STATUS(status);
        }
 
@@ -572,7 +579,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
                           ACPI_NS_SEARCH_PARENT, walk_state,
                           &info.data_register_node);
        if (ACPI_FAILURE(status)) {
-               ACPI_REPORT_NSERROR(arg->common.value.string, status);
+               ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
                return_ACPI_STATUS(status);
        }