From e644814a2ccbfe171d2fd2b9bca491ead1ae1a96 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 15 Jun 2010 17:04:44 +0300 Subject: usb: throw away custom hex digit methods Recent kernel has common method to convert hex digit to its value. Signed-off-by: Andy Shevchenko Cc: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/atm/ueagle-atm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/usb/atm') diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index ebae9448014..5b3f555e01c 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -67,6 +67,7 @@ #include #include #include +#include #include @@ -2436,7 +2437,6 @@ UEA_ATTR(firmid, 0); /* Retrieve the device End System Identifier (MAC) */ -#define htoi(x) (isdigit(x) ? x-'0' : toupper(x)-'A'+10) static int uea_getesi(struct uea_softc *sc, u_char * esi) { unsigned char mac_str[2 * ETH_ALEN + 1]; @@ -2447,7 +2447,8 @@ static int uea_getesi(struct uea_softc *sc, u_char * esi) return 1; for (i = 0; i < ETH_ALEN; i++) - esi[i] = htoi(mac_str[2 * i]) * 16 + htoi(mac_str[2 * i + 1]); + esi[i] = hex_to_bin(mac_str[2 * i]) * 16 + + hex_to_bin(mac_str[2 * i + 1]); return 0; } -- cgit v1.2.3