diff options
Diffstat (limited to 'drivers/atm')
-rw-r--r-- | drivers/atm/nicstar.c | 15 |
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); | |||
154 | #endif | 154 | #endif |
155 | static void ns_poll(unsigned long arg); | 155 | static void ns_poll(unsigned long arg); |
156 | static int ns_parse_mac(char *mac, unsigned char *esi); | 156 | static int ns_parse_mac(char *mac, unsigned char *esi); |
157 | static short ns_h2i(char c); | ||
158 | static void ns_phy_put(struct atm_dev *dev, unsigned char value, | 157 | static void ns_phy_put(struct atm_dev *dev, unsigned char value, |
159 | unsigned long addr); | 158 | unsigned long addr); |
160 | static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr); | 159 | 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) | |||
2824 | return -1; | 2823 | return -1; |
2825 | j = 0; | 2824 | j = 0; |
2826 | for (i = 0; i < 6; i++) { | 2825 | for (i = 0; i < 6; i++) { |
2827 | if ((byte1 = ns_h2i(mac[j++])) < 0) | 2826 | if ((byte1 = hex_to_bin(mac[j++])) < 0) |
2828 | return -1; | 2827 | return -1; |
2829 | if ((byte0 = ns_h2i(mac[j++])) < 0) | 2828 | if ((byte0 = hex_to_bin(mac[j++])) < 0) |
2830 | return -1; | 2829 | return -1; |
2831 | esi[i] = (unsigned char)(byte1 * 16 + byte0); | 2830 | esi[i] = (unsigned char)(byte1 * 16 + byte0); |
2832 | if (i < 5) { | 2831 | if (i < 5) { |
@@ -2837,16 +2836,6 @@ static int ns_parse_mac(char *mac, unsigned char *esi) | |||
2837 | return 0; | 2836 | return 0; |
2838 | } | 2837 | } |
2839 | 2838 | ||
2840 | static short ns_h2i(char c) | ||
2841 | { | ||
2842 | if (c >= '0' && c <= '9') | ||
2843 | return (short)(c - '0'); | ||
2844 | if (c >= 'A' && c <= 'F') | ||
2845 | return (short)(c - 'A' + 10); | ||
2846 | if (c >= 'a' && c <= 'f') | ||
2847 | return (short)(c - 'a' + 10); | ||
2848 | return -1; | ||
2849 | } | ||
2850 | 2839 | ||
2851 | static void ns_phy_put(struct atm_dev *dev, unsigned char value, | 2840 | static void ns_phy_put(struct atm_dev *dev, unsigned char value, |
2852 | unsigned long addr) | 2841 | unsigned long addr) |