]> err.no Git - linux-2.6/commitdiff
ACPICA: Fix unalignment in acpi_ut_repair_name
authorBob Moore <robert.moore@intel.com>
Fri, 2 Feb 2007 16:48:19 +0000 (19:48 +0300)
committerLen Brown <len.brown@intel.com>
Sat, 3 Feb 2007 02:14:23 +0000 (21:14 -0500)
Update interface to acpi_ut_repair_name() to avoid
alignment issues on IA64

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/namespace/nsdump.c
drivers/acpi/namespace/nssearch.c
drivers/acpi/utilities/utglobal.c
drivers/acpi/utilities/utmisc.c
include/acpi/acutils.h

index d72df66aa96533605b94e54344be46603ebd0abb..da88834f55e78d7470ad2838bdb6646e21386676 100644 (file)
@@ -205,7 +205,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 
                if (!acpi_ut_valid_acpi_name(this_node->name.integer)) {
                        this_node->name.integer =
-                           acpi_ut_repair_name(this_node->name.integer);
+                           acpi_ut_repair_name(this_node->name.ascii);
 
                        ACPI_WARNING((AE_INFO, "Invalid ACPI Name %08X",
                                      this_node->name.integer));
index 500e2bbcfaf72647690f831504dec96bc6766435..566f0a4aff930340494797b4015e1aa4b2bec445 100644 (file)
@@ -321,7 +321,8 @@ acpi_ns_search_and_enter(u32 target_name,
         * even though there are a few bad names.
         */
        if (!acpi_ut_valid_acpi_name(target_name)) {
-               target_name = acpi_ut_repair_name(target_name);
+               target_name =
+                   acpi_ut_repair_name(ACPI_CAST_PTR(char, &target_name));
 
                /* Report warning only if in strict mode or debug mode */
 
index a524e75b7ae4122455133997d3bd84c4bb9e5f97..855bc8fea3a4a24d1a8b775729d9082b27df90c7 100644 (file)
@@ -566,7 +566,7 @@ char *acpi_ut_get_node_name(void *object)
        /* Name must be a valid ACPI name */
 
        if (!acpi_ut_valid_acpi_name(node->name.integer)) {
-               node->name.integer = acpi_ut_repair_name(node->name.integer);
+               node->name.integer = acpi_ut_repair_name(node->name.ascii);
        }
 
        /* Return the name */
index 4b0305174d25984990c90d90676e9da55446baea..36d88158f9f4d0ddea7c166dea5f12b3bf771c1b 100644 (file)
@@ -582,26 +582,25 @@ u8 acpi_ut_valid_acpi_name(u32 name)
  *
  ******************************************************************************/
 
-acpi_name acpi_ut_repair_name(acpi_name name)
+acpi_name acpi_ut_repair_name(char *name)
 {
-       char *name_ptr = ACPI_CAST_PTR(char, &name);
-       char new_name[ACPI_NAME_SIZE];
        acpi_native_uint i;
+       char new_name[ACPI_NAME_SIZE];
 
        for (i = 0; i < ACPI_NAME_SIZE; i++) {
-               new_name[i] = name_ptr[i];
+               new_name[i] = name[i];
 
                /*
                 * Replace a bad character with something printable, yet technically
                 * still invalid. This prevents any collisions with existing "good"
                 * names in the namespace.
                 */
-               if (!acpi_ut_valid_acpi_char(name_ptr[i], i)) {
+               if (!acpi_ut_valid_acpi_char(name[i], i)) {
                        new_name[i] = '*';
                }
        }
 
-       return (*ACPI_CAST_PTR(u32, new_name));
+       return (*(u32 *) new_name);
 }
 
 /*******************************************************************************
index ba039ea1a057ab8e39ab5844c34f75b31131d15d..beb07ac83b8aad3a26d13fe216f43763496f80b9 100644 (file)
@@ -470,7 +470,7 @@ void acpi_ut_print_string(char *string, u8 max_length);
 
 u8 acpi_ut_valid_acpi_name(u32 name);
 
-acpi_name acpi_ut_repair_name(acpi_name name);
+acpi_name acpi_ut_repair_name(char *name);
 
 u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position);