diff options
author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2010-07-15 02:37:18 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-15 19:05:24 -0700 |
commit | 735c65ce4a878b55e08821360fdfd42753cdbe14 (patch) | |
tree | 3ea8202ebfb703fc16b65dc4dfbc717bb2541cee /drivers/isdn/capi/capidrv.c | |
parent | 8f31539dfa36d8cf880576348d149af0cc1d788a (diff) | |
download | blackbird-obmc-linux-735c65ce4a878b55e08821360fdfd42753cdbe14.tar.gz blackbird-obmc-linux-735c65ce4a878b55e08821360fdfd42753cdbe14.zip |
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/capi/capidrv.c')
-rw-r--r-- | drivers/isdn/capi/capidrv.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index bf55ed5f38e3..2978bdaa6b88 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c @@ -1450,12 +1450,9 @@ static void handle_dtrace_data(capidrv_contr *card, } for (p = data, end = data+len; p < end; p++) { - u8 w; PUTBYTE_TO_STATUS(card, ' '); - w = (*p >> 4) & 0xf; - PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w); - w = *p & 0xf; - PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w); + PUTBYTE_TO_STATUS(card, hex_asc_hi(*p)); + PUTBYTE_TO_STATUS(card, hex_asc_lo(*p)); } PUTBYTE_TO_STATUS(card, '\n'); |