diff options
Diffstat (limited to 'drivers/usb/atm')
-rw-r--r-- | drivers/usb/atm/ueagle-atm.c | 5 |
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) | ||
2440 | static int uea_getesi(struct uea_softc *sc, u_char * esi) | 2440 | static 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 | } |