Skip to content

Commit

Permalink
drivers: acpi: don't use own implementation of hex_to_bin()
Browse files Browse the repository at this point in the history
Remove own implementation of hex_to_bin().

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed May 25, 2010
1 parent 2635538 commit 965fd9e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,6 @@ static void acpi_print_osc_error(acpi_handle handle,
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)
{
int i;
Expand All @@ -422,8 +417,8 @@ static acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
return AE_BAD_PARAMETER;
}
for (i = 0; i < 16; i++) {
uuid[i] = hex_val(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]]) << 4;
uuid[i] |= hex_to_bin(str[opc_map_to_uuid[i] + 1]);
}
return AE_OK;
}
Expand Down

0 comments on commit 965fd9e

Please sign in to comment.