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>
This commit is contained in:
David Vrabel 2008-12-22 18:27:17 +00:00
parent bce83697c5
commit e43ace8912
3 changed files with 24 additions and 47 deletions

View file

@ -4,6 +4,7 @@
*
* Copyright (C) 2005-2006 Intel Corporation
* Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
* Copyright (C) 2008 Cambridge Silicon Radio Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version
@ -36,26 +37,6 @@
#include "uwb-internal.h"
void dump_bytes(struct device *dev, const void *_buf, size_t rsize)
{
const char *buf = _buf;
char line[32];
size_t offset = 0;
int cnt, cnt2;
for (cnt = 0; cnt < rsize; cnt += 8) {
size_t rtop = rsize - cnt < 8 ? rsize - cnt : 8;
for (offset = cnt2 = 0; cnt2 < rtop; cnt2++) {
offset += scnprintf(line + offset, sizeof(line) - offset,
"%02x ", buf[cnt + cnt2] & 0xff);
}
if (dev)
dev_info(dev, "%s\n", line);
else
printk(KERN_INFO "%s\n", line);
}
}
EXPORT_SYMBOL_GPL(dump_bytes);
/*
* Debug interface
*