[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <ee8a4349cc0eb3a881994b77e1e415b92ff7e669.1285024850.git.andy.shevchenko@gmail.com>
Date: Tue, 21 Sep 2010 02:27:06 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: linux-kernel@...r.krenel.org
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Andy Shevchenko <andy.shevchenko@...il.com>,
Chas Williams <chas@....nrl.navy.mil>,
linux-atm-general@...ts.sourceforge.net
Subject: [PATCH 1/3] drivers: atm: use native kernel's hex_to_bin() func
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Chas Williams <chas@....nrl.navy.mil>
Cc: linux-atm-general@...ts.sourceforge.net
---
drivers/atm/horizon.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 54720ba..dbce700 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);
}
}
--
1.7.2.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists