Skip to content

Commit 965fd9e

Browse files
Andy Shevchenkotorvalds
Andy Shevchenko
authored andcommitted
drivers: acpi: don't use own implementation of hex_to_bin()
Remove own implementation of hex_to_bin(). Signed-off-by: Andy Shevchenko <[email protected]> Cc: Len Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 2635538 commit 965fd9e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

drivers/acpi/bus.c

+2-7
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,6 @@ static void acpi_print_osc_error(acpi_handle handle,
401401
printk("\n");
402402
}
403403

404-
static u8 hex_val(unsigned char c)
405-
{
406-
return isdigit(c) ? c - '0' : toupper(c) - 'A' + 10;
407-
}
408-
409404
static acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
410405
{
411406
int i;
@@ -422,8 +417,8 @@ static acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
422417
return AE_BAD_PARAMETER;
423418
}
424419
for (i = 0; i < 16; i++) {
425-
uuid[i] = hex_val(str[opc_map_to_uuid[i]]) << 4;
426-
uuid[i] |= hex_val(str[opc_map_to_uuid[i] + 1]);
420+
uuid[i] = hex_to_bin(str[opc_map_to_uuid[i]]) << 4;
421+
uuid[i] |= hex_to_bin(str[opc_map_to_uuid[i] + 1]);
427422
}
428423
return AE_OK;
429424
}

0 commit comments

Comments
 (0)