提交 de8e7db7 编写于 作者: B Bob Moore 提交者: Rafael J. Wysocki

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: NBob Moore <robert.moore@intel.com>
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 7cec7048
...@@ -620,7 +620,7 @@ void acpi_ut_print_string(char *string, u8 max_length); ...@@ -620,7 +620,7 @@ void acpi_ut_print_string(char *string, u8 max_length);
void ut_convert_backslashes(char *pathname); void ut_convert_backslashes(char *pathname);
u8 acpi_ut_valid_acpi_name(u32 name); u8 acpi_ut_valid_acpi_name(char *name);
u8 acpi_ut_valid_acpi_char(char character, u32 position); u8 acpi_ut_valid_acpi_char(char character, u32 position);
......
...@@ -141,8 +141,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) ...@@ -141,8 +141,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
ACPI_BIOS_ERROR((AE_INFO, ACPI_BIOS_ERROR((AE_INFO,
"Table has invalid signature [%4.4s] (0x%8.8X), " "Table has invalid signature [%4.4s] (0x%8.8X), "
"must be SSDT or OEMx", "must be SSDT or OEMx",
acpi_ut_valid_acpi_name(*(u32 *)table_desc-> acpi_ut_valid_acpi_name(table_desc->pointer->
pointer->
signature) ? signature) ?
table_desc->pointer->signature : "????", table_desc->pointer->signature : "????",
*(u32 *)table_desc->pointer->signature)); *(u32 *)table_desc->pointer->signature));
......
...@@ -462,7 +462,8 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position) ...@@ -462,7 +462,8 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position)
* *
* FUNCTION: acpi_ut_valid_acpi_name * FUNCTION: acpi_ut_valid_acpi_name
* *
* PARAMETERS: name - The name to be examined * PARAMETERS: name - The name to be examined. Does not have to
* be NULL terminated string.
* *
* RETURN: TRUE if the name is valid, FALSE otherwise * RETURN: TRUE if the name is valid, FALSE otherwise
* *
...@@ -473,15 +474,14 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position) ...@@ -473,15 +474,14 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position)
* *
******************************************************************************/ ******************************************************************************/
u8 acpi_ut_valid_acpi_name(u32 name) u8 acpi_ut_valid_acpi_name(char *name)
{ {
u32 i; u32 i;
ACPI_FUNCTION_ENTRY(); ACPI_FUNCTION_ENTRY();
for (i = 0; i < ACPI_NAME_SIZE; i++) { for (i = 0; i < ACPI_NAME_SIZE; i++) {
if (!acpi_ut_valid_acpi_char if (!acpi_ut_valid_acpi_char(name[i], i)) {
((ACPI_CAST_PTR(char, &name))[i], i)) {
return (FALSE); return (FALSE);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册