summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2010-07-15 02:37:18 +0000
committerDavid S. Miller <davem@davemloft.net>2010-07-15 19:05:24 -0700
commit735c65ce4a878b55e08821360fdfd42753cdbe14 (patch)
tree3ea8202ebfb703fc16b65dc4dfbc717bb2541cee /drivers/isdn/hisax
parent8f31539dfa36d8cf880576348d149af0cc1d788a (diff)
downloadop-kernel-dev-735c65ce4a878b55e08821360fdfd42753cdbe14.zip
op-kernel-dev-735c65ce4a878b55e08821360fdfd42753cdbe14.tar.gz
drivers: isdn: use kernel macros to convert hex digit
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Tilman Schmidt <tilman@imap.cc> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hisax')
-rw-r--r--drivers/isdn/hisax/q931.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/isdn/hisax/q931.c b/drivers/isdn/hisax/q931.c
index 8b853d5..c0771f9 100644
--- a/drivers/isdn/hisax/q931.c
+++ b/drivers/isdn/hisax/q931.c
@@ -1152,20 +1152,11 @@ QuickHex(char *txt, u_char * p, int cnt)
{
register int i;
register char *t = txt;
- register u_char w;
for (i = 0; i < cnt; i++) {
*t++ = ' ';
- w = (p[i] >> 4) & 0x0f;
- if (w < 10)
- *t++ = '0' + w;
- else
- *t++ = 'A' - 10 + w;
- w = p[i] & 0x0f;
- if (w < 10)
- *t++ = '0' + w;
- else
- *t++ = 'A' - 10 + w;
+ *t++ = hex_asc_hi(p[i]);
+ *t++ = hex_asc_lo(p[i]);
}
*t++ = 0;
return (t - txt);
OpenPOWER on IntegriCloud