diff options
Diffstat (limited to 'drivers/acpi/utilities/utmisc.c')
-rw-r--r-- | drivers/acpi/utilities/utmisc.c | 11 |
1 files changed, 5 insertions, 6 deletions
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 | /******************************************************************************* |