summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2010-07-23 05:18:06 +0200
committerDavid S. Miller <davem@davemloft.net>2010-07-23 21:50:49 +0200
commit2b27822ff8f257f810761c3d23e8104d1404cf3b (patch)
tree0df9303f3752bdfe614f26e0ac953da008e1b41c
parentbe2net: bump the driver version number (diff)
downloadlinux-2b27822ff8f257f810761c3d23e8104d1404cf3b.tar.xz
linux-2b27822ff8f257f810761c3d23e8104d1404cf3b.zip
drivers: atm: don't use private copy of hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Chas Williams <chas@cmf.nrl.navy.mil> Cc: linux-atm-general@lists.sourceforge.net Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/atm/nicstar.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 729a149b6b2b..2f3516b7f118 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -154,7 +154,6 @@ static void which_list(ns_dev * card, struct sk_buff *skb);
#endif
static void ns_poll(unsigned long arg);
static int ns_parse_mac(char *mac, unsigned char *esi);
-static short ns_h2i(char c);
static void ns_phy_put(struct atm_dev *dev, unsigned char value,
unsigned long addr);
static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr);
@@ -2824,9 +2823,9 @@ static int ns_parse_mac(char *mac, unsigned char *esi)
return -1;
j = 0;
for (i = 0; i < 6; i++) {
- if ((byte1 = ns_h2i(mac[j++])) < 0)
+ if ((byte1 = hex_to_bin(mac[j++])) < 0)
return -1;
- if ((byte0 = ns_h2i(mac[j++])) < 0)
+ if ((byte0 = hex_to_bin(mac[j++])) < 0)
return -1;
esi[i] = (unsigned char)(byte1 * 16 + byte0);
if (i < 5) {
@@ -2837,16 +2836,6 @@ static int ns_parse_mac(char *mac, unsigned char *esi)
return 0;
}
-static short ns_h2i(char c)
-{
- if (c >= '0' && c <= '9')
- return (short)(c - '0');
- if (c >= 'A' && c <= 'F')
- return (short)(c - 'A' + 10);
- if (c >= 'a' && c <= 'f')
- return (short)(c - 'a' + 10);
- return -1;
-}
static void ns_phy_put(struct atm_dev *dev, unsigned char value,
unsigned long addr)