diff mbox

[PATCHv1.5,1/3] drivers: atm: use native kernel's hex_to_bin() func

Message ID 2d00b66224535ae82be1a1e638b86b81fb890f58.1285051188.git.andy.shevchenko@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Andy Shevchenko Sept. 21, 2010, 6:40 a.m. UTC
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net
---
 drivers/atm/horizon.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

Comments

David Miller Sept. 22, 2010, 1:07 a.m. UTC | #1
From: Andy Shevchenko <andy.shevchenko@gmail.com>
Date: Tue, 21 Sep 2010 09:40:24 +0300

> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Cc: Chas Williams <chas@cmf.nrl.navy.mil>
> Cc: linux-atm-general@lists.sourceforge.net

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 54720ba..a957904 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);
     }
   }