summaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2010-09-20 20:40:24 +0000
committerDavid S. Miller <davem@davemloft.net>2010-09-21 18:04:44 -0700
commit66bb16de6b9a05936d1eeb20155bab008b476191 (patch)
treeca537d42a158f57bfa5c02cdf4f80cd55b04ffb2 /drivers/atm
parentd9fd1b2857154f1ac32ca041641ba947525ff7fa (diff)
downloadblackbird-op-linux-66bb16de6b9a05936d1eeb20155bab008b476191.tar.gz
blackbird-op-linux-66bb16de6b9a05936d1eeb20155bab008b476191.zip
drivers: atm: use native kernel's hex_to_bin() func
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>
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/horizon.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 54720baa7363..a95790452a68 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -1645,10 +1645,8 @@ static int hrz_send (struct atm_vcc * atm_vcc, struct sk_buff * skb) {
unsigned short d = 0;
char * s = skb->data;
if (*s++ == 'D') {
- for (i = 0; i < 4; ++i) {
- d = (d<<4) | ((*s <= '9') ? (*s - '0') : (*s - 'a' + 10));
- ++s;
- }
+ for (i = 0; i < 4; ++i)
+ d = (d << 4) | hex_to_bin(*s++);
PRINTK (KERN_INFO, "debug bitmap is now %hx", debug = d);
}
}
OpenPOWER on IntegriCloud