Pull Kconfig into release branch
[pandora-kernel.git] / drivers / acpi / executer / exconfig.c
index e0deffb..8233524 100644 (file)
@@ -82,7 +82,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
        struct acpi_table_desc table_info;
        union acpi_operand_object *obj_desc;
 
-       ACPI_FUNCTION_TRACE("ex_add_table");
+       ACPI_FUNCTION_TRACE(ex_add_table);
 
        /* Create an object to be the table handle */
 
@@ -100,7 +100,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
 
        ACPI_MEMSET(&table_info, 0, sizeof(struct acpi_table_desc));
 
-       table_info.type = ACPI_TABLE_SSDT;
+       table_info.type = ACPI_TABLE_ID_SSDT;
        table_info.pointer = table;
        table_info.length = (acpi_size) table->length;
        table_info.allocation = ACPI_MEM_ALLOCATED;
@@ -162,7 +162,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
        struct acpi_namespace_node *parameter_node = NULL;
        union acpi_operand_object *ddb_handle;
 
-       ACPI_FUNCTION_TRACE("ex_load_table_op");
+       ACPI_FUNCTION_TRACE(ex_load_table_op);
 
 #if 0
        /*
@@ -214,9 +214,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
                 * location within the namespace where the table will be loaded.
                 */
                status =
-                   acpi_ns_get_node_by_path(operand[3]->string.pointer,
-                                            start_node, ACPI_NS_SEARCH_PARENT,
-                                            &parent_node);
+                   acpi_ns_get_node(start_node, operand[3]->string.pointer,
+                                    ACPI_NS_SEARCH_PARENT, &parent_node);
                if (ACPI_FAILURE(status)) {
                        return_ACPI_STATUS(status);
                }
@@ -237,9 +236,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
                /* Find the node referenced by the parameter_path_string */
 
                status =
-                   acpi_ns_get_node_by_path(operand[4]->string.pointer,
-                                            start_node, ACPI_NS_SEARCH_PARENT,
-                                            &parameter_node);
+                   acpi_ns_get_node(start_node, operand[4]->string.pointer,
+                                    ACPI_NS_SEARCH_PARENT, &parameter_node);
                if (ACPI_FAILURE(status)) {
                        return_ACPI_STATUS(status);
                }
@@ -298,9 +296,10 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
        struct acpi_table_header *table_ptr = NULL;
        acpi_physical_address address;
        struct acpi_table_header table_header;
+       acpi_integer temp;
        u32 i;
 
-       ACPI_FUNCTION_TRACE("ex_load_op");
+       ACPI_FUNCTION_TRACE(ex_load_op);
 
        /* Object can be either an op_region or a Field */
 
@@ -326,7 +325,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 
                address = obj_desc->region.address;
 
-               /* Get the table length from the table header */
+               /* Get part of the table header to get the table length */
 
                table_header.length = 0;
                for (i = 0; i < 8; i++) {
@@ -334,11 +333,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
                            acpi_ev_address_space_dispatch(obj_desc, ACPI_READ,
                                                           (acpi_physical_address)
                                                           (i + address), 8,
-                                                          ((u8 *) &
-                                                           table_header) + i);
+                                                          &temp);
                        if (ACPI_FAILURE(status)) {
                                return_ACPI_STATUS(status);
                        }
+
+                       /* Get the one valid byte of the returned 64-bit value */
+
+                       ACPI_CAST_PTR(u8, &table_header)[i] = (u8) temp;
                }
 
                /* Sanity check the table length */
@@ -361,11 +363,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
                            acpi_ev_address_space_dispatch(obj_desc, ACPI_READ,
                                                           (acpi_physical_address)
                                                           (i + address), 8,
-                                                          ((u8 *) table_ptr +
-                                                           i));
+                                                          &temp);
                        if (ACPI_FAILURE(status)) {
                                goto cleanup;
                        }
+
+                       /* Get the one valid byte of the returned 64-bit value */
+
+                       ACPI_CAST_PTR(u8, table_ptr)[i] = (u8) temp;
                }
                break;
 
@@ -411,12 +416,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 
        /* The table must be either an SSDT or a PSDT */
 
-       if ((!ACPI_STRNCMP(table_ptr->signature,
-                          acpi_gbl_table_data[ACPI_TABLE_PSDT].signature,
-                          acpi_gbl_table_data[ACPI_TABLE_PSDT].sig_length)) &&
-           (!ACPI_STRNCMP(table_ptr->signature,
-                          acpi_gbl_table_data[ACPI_TABLE_SSDT].signature,
-                          acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) {
+       if ((!ACPI_COMPARE_NAME(table_ptr->signature, PSDT_SIG)) &&
+           (!ACPI_COMPARE_NAME(table_ptr->signature, SSDT_SIG))) {
                ACPI_ERROR((AE_INFO,
                            "Table has invalid signature [%4.4s], must be SSDT or PSDT",
                            table_ptr->signature));
@@ -470,7 +471,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
        union acpi_operand_object *table_desc = ddb_handle;
        struct acpi_table_desc *table_info;
 
-       ACPI_FUNCTION_TRACE("ex_unload_table");
+       ACPI_FUNCTION_TRACE(ex_unload_table);
 
        /*
         * Validate the handle