Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203691
b: refs/heads/master
c: fd1f170
h: refs/heads/master
i:
  203689: a72b108
  203687: 00ffb41
v: v3
  • Loading branch information
Andy Shevchenko authored and David S. Miller committed Jul 23, 2010
1 parent 4d58a39 commit 42e5fd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: 5c4ac8c60aba4b2e9549d139586612855b0fea09
refs/heads/master: fd1f170dfc9d432061540422ddc97058154d94b9
13 changes: 2 additions & 11 deletions trunk/drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <linux/usb.h>
#include <linux/usb/usbnet.h>
#include <linux/slab.h>
#include <linux/kernel.h>

#define DRIVER_VERSION "22-Aug-2005"

Expand Down Expand Up @@ -158,16 +159,6 @@ int usbnet_get_endpoints(struct usbnet *dev, struct usb_interface *intf)
}
EXPORT_SYMBOL_GPL(usbnet_get_endpoints);

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

int usbnet_get_ethernet_addr(struct usbnet *dev, int iMACAddress)
{
int tmp, i;
Expand All @@ -183,7 +174,7 @@ int usbnet_get_ethernet_addr(struct usbnet *dev, int iMACAddress)
}
for (i = tmp = 0; i < 6; i++, tmp += 2)
dev->net->dev_addr [i] =
(nibble(buf [tmp]) << 4) + nibble(buf [tmp + 1]);
(hex_to_bin(buf[tmp]) << 4) + hex_to_bin(buf[tmp + 1]);
return 0;
}
EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr);
Expand Down

0 comments on commit 42e5fd7

Please sign in to comment.