diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-12-22 13:27:17 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-12-22 13:27:17 -0500 |
commit | e43ace891229607c43d35597cbba77c2e40f48d4 (patch) | |
tree | ce5fb73947a1d7fb5a6bbb8ac9d82f3e20c6a316 /drivers/uwb | |
parent | bce83697c5fe84a7a5d38c96fbbe43b4bc028c3e (diff) |
uwb: use print_hex_dump()
Use print_hex_dump() instead of the home-grown dump_bytes().
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/uwb')
-rw-r--r-- | drivers/uwb/uwb-debug.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/uwb/uwb-debug.c b/drivers/uwb/uwb-debug.c index 89b2e6a7214c..4a42993700c1 100644 --- a/drivers/uwb/uwb-debug.c +++ b/drivers/uwb/uwb-debug.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (C) 2005-2006 Intel Corporation | 5 | * Copyright (C) 2005-2006 Intel Corporation |
6 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | 6 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> |
7 | * Copyright (C) 2008 Cambridge Silicon Radio Ltd. | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License version | 10 | * modify it under the terms of the GNU General Public License version |
@@ -36,26 +37,6 @@ | |||
36 | 37 | ||
37 | #include "uwb-internal.h" | 38 | #include "uwb-internal.h" |
38 | 39 | ||
39 | void dump_bytes(struct device *dev, const void *_buf, size_t rsize) | ||
40 | { | ||
41 | const char *buf = _buf; | ||
42 | char line[32]; | ||
43 | size_t offset = 0; | ||
44 | int cnt, cnt2; | ||
45 | for (cnt = 0; cnt < rsize; cnt += 8) { | ||
46 | size_t rtop = rsize - cnt < 8 ? rsize - cnt : 8; | ||
47 | for (offset = cnt2 = 0; cnt2 < rtop; cnt2++) { | ||
48 | offset += scnprintf(line + offset, sizeof(line) - offset, | ||
49 | "%02x ", buf[cnt + cnt2] & 0xff); | ||
50 | } | ||
51 | if (dev) | ||
52 | dev_info(dev, "%s\n", line); | ||
53 | else | ||
54 | printk(KERN_INFO "%s\n", line); | ||
55 | } | ||
56 | } | ||
57 | EXPORT_SYMBOL_GPL(dump_bytes); | ||
58 | |||
59 | /* | 40 | /* |
60 | * Debug interface | 41 | * Debug interface |
61 | * | 42 | * |