aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm
diff options
context:
space:
mode:
authorAndy Shevchenko <ext-andriy.shevchenko@nokia.com>2010-06-15 10:04:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 17:35:35 -0400
commite644814a2ccbfe171d2fd2b9bca491ead1ae1a96 (patch)
tree7610bc54a5e84406c23aef29ac38b2a1ad122e9e /drivers/usb/atm
parenta5cc8049ca8ec8b09b9649f32b6e37f94345ddb8 (diff)
usb: throw away custom hex digit methods
Recent kernel has common method to convert hex digit to its value. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm')
-rw-r--r--drivers/usb/atm/ueagle-atm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index ebae94480140..5b3f555e01c9 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -67,6 +67,7 @@
67#include <linux/mutex.h> 67#include <linux/mutex.h>
68#include <linux/freezer.h> 68#include <linux/freezer.h>
69#include <linux/slab.h> 69#include <linux/slab.h>
70#include <linux/kernel.h>
70 71
71#include <asm/unaligned.h> 72#include <asm/unaligned.h>
72 73
@@ -2436,7 +2437,6 @@ UEA_ATTR(firmid, 0);
2436 2437
2437/* Retrieve the device End System Identifier (MAC) */ 2438/* Retrieve the device End System Identifier (MAC) */
2438 2439
2439#define htoi(x) (isdigit(x) ? x-'0' : toupper(x)-'A'+10)
2440static int uea_getesi(struct uea_softc *sc, u_char * esi) 2440static int uea_getesi(struct uea_softc *sc, u_char * esi)
2441{ 2441{
2442 unsigned char mac_str[2 * ETH_ALEN + 1]; 2442 unsigned char mac_str[2 * ETH_ALEN + 1];
@@ -2447,7 +2447,8 @@ static int uea_getesi(struct uea_softc *sc, u_char * esi)
2447 return 1; 2447 return 1;
2448 2448
2449 for (i = 0; i < ETH_ALEN; i++) 2449 for (i = 0; i < ETH_ALEN; i++)
2450 esi[i] = htoi(mac_str[2 * i]) * 16 + htoi(mac_str[2 * i + 1]); 2450 esi[i] = hex_to_bin(mac_str[2 * i]) * 16 +
2451 hex_to_bin(mac_str[2 * i + 1]);
2451 2452
2452 return 0; 2453 return 0;
2453} 2454}