提交 66bb16de 编写于 作者: A Andy Shevchenko 提交者: David S. Miller

drivers: atm: use native kernel's hex_to_bin() func

Signed-off-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d9fd1b28
...@@ -1645,10 +1645,8 @@ static int hrz_send (struct atm_vcc * atm_vcc, struct sk_buff * skb) { ...@@ -1645,10 +1645,8 @@ static int hrz_send (struct atm_vcc * atm_vcc, struct sk_buff * skb) {
unsigned short d = 0; unsigned short d = 0;
char * s = skb->data; char * s = skb->data;
if (*s++ == 'D') { if (*s++ == 'D') {
for (i = 0; i < 4; ++i) { for (i = 0; i < 4; ++i)
d = (d<<4) | ((*s <= '9') ? (*s - '0') : (*s - 'a' + 10)); d = (d << 4) | hex_to_bin(*s++);
++s;
}
PRINTK (KERN_INFO, "debug bitmap is now %hx", debug = d); PRINTK (KERN_INFO, "debug bitmap is now %hx", debug = d);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册