From 6a0df32c22fdfc414e6613c1bc911f19f39df01b Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Thu, 5 May 2016 13:00:36 +0800 Subject: ACPICA: Move all ASCII utilities to a common file ACPICA commit ba60e4500053010bf775d58f6f61febbdb94d817 New file is utascii.c Link: https://github.com/acpica/acpica/commit/ba60e450 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/utstring.c | 69 +----------------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) (limited to 'drivers/acpi/acpica/utstring.c') diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c index 241259b..288913a 100644 --- a/drivers/acpi/acpica/utstring.c +++ b/drivers/acpi/acpica/utstring.c @@ -145,73 +145,6 @@ void acpi_ut_print_string(char *string, u16 max_length) /******************************************************************************* * - * FUNCTION: acpi_ut_valid_acpi_char - * - * PARAMETERS: char - The character to be examined - * position - Byte position (0-3) - * - * RETURN: TRUE if the character is valid, FALSE otherwise - * - * DESCRIPTION: Check for a valid ACPI character. Must be one of: - * 1) Upper case alpha - * 2) numeric - * 3) underscore - * - * We allow a '!' as the last character because of the ASF! table - * - ******************************************************************************/ - -u8 acpi_ut_valid_acpi_char(char character, u32 position) -{ - - if (!((character >= 'A' && character <= 'Z') || - (character >= '0' && character <= '9') || (character == '_'))) { - - /* Allow a '!' in the last position */ - - if (character == '!' && position == 3) { - return (TRUE); - } - - return (FALSE); - } - - return (TRUE); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_valid_acpi_name - * - * PARAMETERS: name - The name to be examined. Does not have to - * be NULL terminated string. - * - * RETURN: TRUE if the name is valid, FALSE otherwise - * - * DESCRIPTION: Check for a valid ACPI name. Each character must be one of: - * 1) Upper case alpha - * 2) numeric - * 3) underscore - * - ******************************************************************************/ - -u8 acpi_ut_valid_acpi_name(char *name) -{ - u32 i; - - ACPI_FUNCTION_ENTRY(); - - for (i = 0; i < ACPI_NAME_SIZE; i++) { - if (!acpi_ut_valid_acpi_char(name[i], i)) { - return (FALSE); - } - } - - return (TRUE); -} - -/******************************************************************************* - * * FUNCTION: acpi_ut_repair_name * * PARAMETERS: name - The ACPI name to be repaired @@ -253,7 +186,7 @@ void acpi_ut_repair_name(char *name) /* Check each character in the name */ for (i = 0; i < ACPI_NAME_SIZE; i++) { - if (acpi_ut_valid_acpi_char(name[i], i)) { + if (acpi_ut_valid_name_char(name[i], i)) { continue; } -- cgit v1.1