Commit 965fd9e9 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Torvalds

drivers: acpi: don't use own implementation of hex_to_bin()

Remove own implementation of hex_to_bin().
Signed-off-by: default avatarAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 26355387
...@@ -401,11 +401,6 @@ static void acpi_print_osc_error(acpi_handle handle, ...@@ -401,11 +401,6 @@ static void acpi_print_osc_error(acpi_handle handle,
printk("\n"); printk("\n");
} }
static u8 hex_val(unsigned char c)
{
return isdigit(c) ? c - '0' : toupper(c) - 'A' + 10;
}
static acpi_status acpi_str_to_uuid(char *str, u8 *uuid) static acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
{ {
int i; int i;
...@@ -422,8 +417,8 @@ static acpi_status acpi_str_to_uuid(char *str, u8 *uuid) ...@@ -422,8 +417,8 @@ static acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
} }
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
uuid[i] = hex_val(str[opc_map_to_uuid[i]]) << 4; uuid[i] = hex_to_bin(str[opc_map_to_uuid[i]]) << 4;
uuid[i] |= hex_val(str[opc_map_to_uuid[i] + 1]); uuid[i] |= hex_to_bin(str[opc_map_to_uuid[i] + 1]);
} }
return AE_OK; return AE_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment