diff options
author | Bob Moore <robert.moore@intel.com> | 2013-06-07 20:59:44 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-15 19:00:46 -0400 |
commit | de8e7db74a98124406b72a528f4c79766e08b410 (patch) | |
tree | 83bde8129c46e78741155c153ae7fe68e36231bf /drivers/acpi/acpica | |
parent | 7cec7048fe22e3e92389da2cd67098f6c4284e7f (diff) |
ACPICA: Update interface to acpi_ut_valid_acpi_name()
Clean up the interface by making the input argument a char *
string instead of a UINT32 name. This is easier to use for all
callers and eliminates casting to *(UINT32*)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r-- | drivers/acpi/acpica/acutils.h | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbinstal.c | 3 | ||||
-rw-r--r-- | drivers/acpi/acpica/utstring.c | 8 |
3 files changed, 6 insertions, 7 deletions
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index d552036935d4..3c76edea6803 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h | |||
@@ -620,7 +620,7 @@ void acpi_ut_print_string(char *string, u8 max_length); | |||
620 | 620 | ||
621 | void ut_convert_backslashes(char *pathname); | 621 | void ut_convert_backslashes(char *pathname); |
622 | 622 | ||
623 | u8 acpi_ut_valid_acpi_name(u32 name); | 623 | u8 acpi_ut_valid_acpi_name(char *name); |
624 | 624 | ||
625 | u8 acpi_ut_valid_acpi_char(char character, u32 position); | 625 | u8 acpi_ut_valid_acpi_char(char character, u32 position); |
626 | 626 | ||
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c index a04e54d984d9..42a13c0d7015 100644 --- a/drivers/acpi/acpica/tbinstal.c +++ b/drivers/acpi/acpica/tbinstal.c | |||
@@ -141,8 +141,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) | |||
141 | ACPI_BIOS_ERROR((AE_INFO, | 141 | ACPI_BIOS_ERROR((AE_INFO, |
142 | "Table has invalid signature [%4.4s] (0x%8.8X), " | 142 | "Table has invalid signature [%4.4s] (0x%8.8X), " |
143 | "must be SSDT or OEMx", | 143 | "must be SSDT or OEMx", |
144 | acpi_ut_valid_acpi_name(*(u32 *)table_desc-> | 144 | acpi_ut_valid_acpi_name(table_desc->pointer-> |
145 | pointer-> | ||
146 | signature) ? | 145 | signature) ? |
147 | table_desc->pointer->signature : "????", | 146 | table_desc->pointer->signature : "????", |
148 | *(u32 *)table_desc->pointer->signature)); | 147 | *(u32 *)table_desc->pointer->signature)); |
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c index 31a06a17e29d..c53759b76a3f 100644 --- a/drivers/acpi/acpica/utstring.c +++ b/drivers/acpi/acpica/utstring.c | |||
@@ -462,7 +462,8 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position) | |||
462 | * | 462 | * |
463 | * FUNCTION: acpi_ut_valid_acpi_name | 463 | * FUNCTION: acpi_ut_valid_acpi_name |
464 | * | 464 | * |
465 | * PARAMETERS: name - The name to be examined | 465 | * PARAMETERS: name - The name to be examined. Does not have to |
466 | * be NULL terminated string. | ||
466 | * | 467 | * |
467 | * RETURN: TRUE if the name is valid, FALSE otherwise | 468 | * RETURN: TRUE if the name is valid, FALSE otherwise |
468 | * | 469 | * |
@@ -473,15 +474,14 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position) | |||
473 | * | 474 | * |
474 | ******************************************************************************/ | 475 | ******************************************************************************/ |
475 | 476 | ||
476 | u8 acpi_ut_valid_acpi_name(u32 name) | 477 | u8 acpi_ut_valid_acpi_name(char *name) |
477 | { | 478 | { |
478 | u32 i; | 479 | u32 i; |
479 | 480 | ||
480 | ACPI_FUNCTION_ENTRY(); | 481 | ACPI_FUNCTION_ENTRY(); |
481 | 482 | ||
482 | for (i = 0; i < ACPI_NAME_SIZE; i++) { | 483 | for (i = 0; i < ACPI_NAME_SIZE; i++) { |
483 | if (!acpi_ut_valid_acpi_char | 484 | if (!acpi_ut_valid_acpi_char(name[i], i)) { |
484 | ((ACPI_CAST_PTR(char, &name))[i], i)) { | ||
485 | return (FALSE); | 485 | return (FALSE); |
486 | } | 486 | } |
487 | } | 487 | } |