diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-07-30 19:40:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-30 19:40:22 -0400 |
commit | 02137f2e80a4fb1481b2b1663d3d3795e705c5bc (patch) | |
tree | d0d13fecc898dc486bf79c387c7d5b224d2bdcf5 /drivers | |
parent | 12dac0756d357325b107fe6ec24921ec38661839 (diff) |
isdn: use the common ascii hex helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/isdn/gigaset/isocdata.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index e30a7773f93c..fbce5222d83c 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c | |||
@@ -247,7 +247,6 @@ static inline void dump_bytes(enum debuglevel level, const char *tag, | |||
247 | #ifdef CONFIG_GIGASET_DEBUG | 247 | #ifdef CONFIG_GIGASET_DEBUG |
248 | unsigned char c; | 248 | unsigned char c; |
249 | static char dbgline[3 * 32 + 1]; | 249 | static char dbgline[3 * 32 + 1]; |
250 | static const char hexdigit[] = "0123456789abcdef"; | ||
251 | int i = 0; | 250 | int i = 0; |
252 | while (count-- > 0) { | 251 | while (count-- > 0) { |
253 | if (i > sizeof(dbgline) - 4) { | 252 | if (i > sizeof(dbgline) - 4) { |
@@ -258,8 +257,8 @@ static inline void dump_bytes(enum debuglevel level, const char *tag, | |||
258 | c = *bytes++; | 257 | c = *bytes++; |
259 | dbgline[i] = (i && !(i % 12)) ? '-' : ' '; | 258 | dbgline[i] = (i && !(i % 12)) ? '-' : ' '; |
260 | i++; | 259 | i++; |
261 | dbgline[i++] = hexdigit[(c >> 4) & 0x0f]; | 260 | dbgline[i++] = hex_asc_hi(c); |
262 | dbgline[i++] = hexdigit[c & 0x0f]; | 261 | dbgline[i++] = hex_asc_lo(c); |
263 | } | 262 | } |
264 | dbgline[i] = '\0'; | 263 | dbgline[i] = '\0'; |
265 | gig_dbg(level, "%s:%s", tag, dbgline); | 264 | gig_dbg(level, "%s:%s", tag, dbgline); |