diff options
author | Bob Moore <robert.moore@intel.com> | 2007-02-02 11:48:19 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:23 -0500 |
commit | 3d81b236a82a26fa8bdef9096829675d81890dc9 (patch) | |
tree | 6953c1fa67f04f3af48d69abca4e53202d20df32 | |
parent | c5a7156959e89b32260ad6072bbf5077bcdfbeee (diff) |
ACPICA: Fix unalignment in acpi_ut_repair_name
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>
-rw-r--r-- | drivers/acpi/namespace/nsdump.c | 2 | ||||
-rw-r--r-- | drivers/acpi/namespace/nssearch.c | 3 | ||||
-rw-r--r-- | drivers/acpi/utilities/utglobal.c | 2 | ||||
-rw-r--r-- | drivers/acpi/utilities/utmisc.c | 11 | ||||
-rw-r--r-- | include/acpi/acutils.h | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c index d72df66aa965..da88834f55e7 100644 --- a/drivers/acpi/namespace/nsdump.c +++ b/drivers/acpi/namespace/nsdump.c | |||
@@ -205,7 +205,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
205 | 205 | ||
206 | if (!acpi_ut_valid_acpi_name(this_node->name.integer)) { | 206 | if (!acpi_ut_valid_acpi_name(this_node->name.integer)) { |
207 | this_node->name.integer = | 207 | this_node->name.integer = |
208 | acpi_ut_repair_name(this_node->name.integer); | 208 | acpi_ut_repair_name(this_node->name.ascii); |
209 | 209 | ||
210 | ACPI_WARNING((AE_INFO, "Invalid ACPI Name %08X", | 210 | ACPI_WARNING((AE_INFO, "Invalid ACPI Name %08X", |
211 | this_node->name.integer)); | 211 | this_node->name.integer)); |
diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index 500e2bbcfaf7..566f0a4aff93 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c | |||
@@ -321,7 +321,8 @@ acpi_ns_search_and_enter(u32 target_name, | |||
321 | * even though there are a few bad names. | 321 | * even though there are a few bad names. |
322 | */ | 322 | */ |
323 | if (!acpi_ut_valid_acpi_name(target_name)) { | 323 | if (!acpi_ut_valid_acpi_name(target_name)) { |
324 | target_name = acpi_ut_repair_name(target_name); | 324 | target_name = |
325 | acpi_ut_repair_name(ACPI_CAST_PTR(char, &target_name)); | ||
325 | 326 | ||
326 | /* Report warning only if in strict mode or debug mode */ | 327 | /* Report warning only if in strict mode or debug mode */ |
327 | 328 | ||
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index a524e75b7ae4..855bc8fea3a4 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c | |||
@@ -566,7 +566,7 @@ char *acpi_ut_get_node_name(void *object) | |||
566 | /* Name must be a valid ACPI name */ | 566 | /* Name must be a valid ACPI name */ |
567 | 567 | ||
568 | if (!acpi_ut_valid_acpi_name(node->name.integer)) { | 568 | if (!acpi_ut_valid_acpi_name(node->name.integer)) { |
569 | node->name.integer = acpi_ut_repair_name(node->name.integer); | 569 | node->name.integer = acpi_ut_repair_name(node->name.ascii); |
570 | } | 570 | } |
571 | 571 | ||
572 | /* Return the name */ | 572 | /* Return the name */ |
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 4b0305174d25..36d88158f9f4 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -582,26 +582,25 @@ u8 acpi_ut_valid_acpi_name(u32 name) | |||
582 | * | 582 | * |
583 | ******************************************************************************/ | 583 | ******************************************************************************/ |
584 | 584 | ||
585 | acpi_name acpi_ut_repair_name(acpi_name name) | 585 | acpi_name acpi_ut_repair_name(char *name) |
586 | { | 586 | { |
587 | char *name_ptr = ACPI_CAST_PTR(char, &name); | ||
588 | char new_name[ACPI_NAME_SIZE]; | ||
589 | acpi_native_uint i; | 587 | acpi_native_uint i; |
588 | char new_name[ACPI_NAME_SIZE]; | ||
590 | 589 | ||
591 | for (i = 0; i < ACPI_NAME_SIZE; i++) { | 590 | for (i = 0; i < ACPI_NAME_SIZE; i++) { |
592 | new_name[i] = name_ptr[i]; | 591 | new_name[i] = name[i]; |
593 | 592 | ||
594 | /* | 593 | /* |
595 | * Replace a bad character with something printable, yet technically | 594 | * Replace a bad character with something printable, yet technically |
596 | * still invalid. This prevents any collisions with existing "good" | 595 | * still invalid. This prevents any collisions with existing "good" |
597 | * names in the namespace. | 596 | * names in the namespace. |
598 | */ | 597 | */ |
599 | if (!acpi_ut_valid_acpi_char(name_ptr[i], i)) { | 598 | if (!acpi_ut_valid_acpi_char(name[i], i)) { |
600 | new_name[i] = '*'; | 599 | new_name[i] = '*'; |
601 | } | 600 | } |
602 | } | 601 | } |
603 | 602 | ||
604 | return (*ACPI_CAST_PTR(u32, new_name)); | 603 | return (*(u32 *) new_name); |
605 | } | 604 | } |
606 | 605 | ||
607 | /******************************************************************************* | 606 | /******************************************************************************* |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index ba039ea1a057..beb07ac83b8a 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -470,7 +470,7 @@ void acpi_ut_print_string(char *string, u8 max_length); | |||
470 | 470 | ||
471 | u8 acpi_ut_valid_acpi_name(u32 name); | 471 | u8 acpi_ut_valid_acpi_name(u32 name); |
472 | 472 | ||
473 | acpi_name acpi_ut_repair_name(acpi_name name); | 473 | acpi_name acpi_ut_repair_name(char *name); |
474 | 474 | ||
475 | u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position); | 475 | u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position); |
476 | 476 | ||