]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
drivers: atm: use native kernel's hex_to_bin() func
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Mon, 20 Sep 2010 20:40:24 +0000 (20:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Sep 2010 01:04:44 +0000 (18:04 -0700)
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>
drivers/atm/horizon.c

index 54720baa7363996203a9489a0bfae45e0fa4a7da..a95790452a685f3325ed64af5db2f2596f911236 100644 (file)
@@ -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);
     }
   }