We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2635538 commit 965fd9eCopy full SHA for 965fd9e
drivers/acpi/bus.c
@@ -401,11 +401,6 @@ static void acpi_print_osc_error(acpi_handle handle,
401
printk("\n");
402
}
403
404
-static u8 hex_val(unsigned char c)
405
-{
406
- return isdigit(c) ? c - '0' : toupper(c) - 'A' + 10;
407
-}
408
-
409
static acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
410
{
411
int i;
@@ -422,8 +417,8 @@ static acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
422
417
return AE_BAD_PARAMETER;
423
418
424
419
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]);
427
428
return AE_OK;
429
0 commit comments