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

Previous thread: checkpatch: add check for too short Kconfig descriptions by Linux Kernel Mailing List on Tuesday, May 25, 2010 - 9:00 am. (1 message)

Next thread: lis3: add missing constants for 8bit device by Linux Kernel Mailing List on Tuesday, May 25, 2010 - 9:00 am. (1 message)
From: Linux Kernel Mailing List
Date: Tuesday, May 25, 2010 - 9:00 am

Gitweb:     http://git.kernel.org/linus/965fd9e9a2d6d0a2704815e4579008a9f65282a0
Commit:     965fd9e9a2d6d0a2704815e4579008a9f65282a0
Parent:     26355387c21accb0919d34ee59478c23b2030ee5
Author:     Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
AuthorDate: Mon May 24 14:33:28 2010 -0700
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Tue May 25 08:07:06 2010 -0700

    drivers: acpi: don't use own implementation of hex_to_bin()
    
    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>
---
 drivers/acpi/bus.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 9042a85..c1d23cd 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -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;
@@ -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;
 }
--

Previous thread: checkpatch: add check for too short Kconfig descriptions by Linux Kernel Mailing List on Tuesday, May 25, 2010 - 9:00 am. (1 message)

Next thread: lis3: add missing constants for 8bit device by Linux Kernel Mailing List on Tuesday, May 25, 2010 - 9:00 am. (1 message)