Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207960
b: refs/heads/master
c: e644814
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent e6ec3e9 commit 6b73d30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5cc8049ca8ec8b09b9649f32b6e37f94345ddb8
refs/heads/master: e644814a2ccbfe171d2fd2b9bca491ead1ae1a96
5 changes: 3 additions & 2 deletions trunk/drivers/usb/atm/ueagle-atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
#include <linux/mutex.h>
#include <linux/freezer.h>
#include <linux/slab.h>
#include <linux/kernel.h>

#include <asm/unaligned.h>

Expand Down Expand Up @@ -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];
Expand All @@ -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;
}
Expand Down
15 changes: 2 additions & 13 deletions trunk/drivers/usb/gadget/u_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,17 +704,6 @@ static char *host_addr;
module_param(host_addr, charp, S_IRUGO);
MODULE_PARM_DESC(host_addr, "Host Ethernet Address");


static u8 __init nibble(unsigned char c)
{
if (isdigit(c))
return c - '0';
c = toupper(c);
if (isxdigit(c))
return 10 + c - 'A';
return 0;
}

static int get_ether_addr(const char *str, u8 *dev_addr)
{
if (str) {
Expand All @@ -725,8 +714,8 @@ static int get_ether_addr(const char *str, u8 *dev_addr)

if ((*str == '.') || (*str == ':'))
str++;
num = nibble(*str++) << 4;
num |= (nibble(*str++));
num = hex_to_bin(*str++) << 4;
num |= hex_to_bin(*str++);
dev_addr [i] = num;
}
if (is_valid_ether_addr(dev_addr))
Expand Down

0 comments on commit 6b73d30

Please sign in to comment.