Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758199Ab0D3Q7l (ORCPT ); Fri, 30 Apr 2010 12:59:41 -0400 Received: from smtp.nokia.com ([192.100.122.230]:59725 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757835Ab0D3Q7a (ORCPT ); Fri, 30 Apr 2010 12:59:30 -0400 From: Andy Shevchenko To: linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Len Brown , Andrew Morton Subject: [PATCH 10/10] drivers: acpi: don't use own implementation of hex_to_bin() Date: Fri, 30 Apr 2010 12:34:09 +0300 Message-Id: X-Mailer: git-send-email 1.6.3.3 In-Reply-To: References: <1a326db89859eec030859e4905c515e0817bd2ea.1272617852.git.ext-andriy.shevchenko@nokia.com> <2eb558b7b0b20dfea0b61223db6146cb8fdbe52d.1272617852.git.ext-andriy.shevchenko@nokia.com> <7cd86c01ad4a376fb8a48ffe307ce7c0510cecc0.1272617852.git.ext-andriy.shevchenko@nokia.com> In-Reply-To: References: X-OriginalArrivalTime: 30 Apr 2010 09:34:10.0099 (UTC) FILETIME=[49723030:01CAE848] X-Nokia-AV: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1390 Lines: 45 Get rid of own implementation of hex_to_bin(). It requires to have hex_to_bin() introduced by starter patch in the series. Signed-off-by: Andy Shevchenko Cc: Len Brown Cc: Andrew Morton --- 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 37132dc..f36ee6f 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -363,11 +363,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; @@ -384,8 +379,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; } -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/