summaryrefslogtreecommitdiff
path: root/include/linux/usb/serial.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-13 20:19:05 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-13 21:14:26 +0400
commit1db9e45c340213d3b19d456fbf678406c1334959 (patch)
tree223949a7bd2117843faa64ebdfb70cd51e95dc0a /include/linux/usb/serial.h
parentb183c19f98f8afee799ee41e062810d6b1c7e123 (diff)
downloadlinux-1db9e45c340213d3b19d456fbf678406c1334959.tar.xz
USB: serial: move usb_serial_debug_data to use %*ph
Now that we have a printk modifier for data streams, use it instead of rolling our own. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/serial.h')
-rw-r--r--include/linux/usb/serial.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 86c0b451745d..9e9a0a8991e4 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -360,15 +360,9 @@ static inline void usb_serial_debug_data(int debug,
const char *function, int size,
const unsigned char *data)
{
- int i;
-
- if (debug) {
- dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ",
- function, size);
- for (i = 0; i < size; ++i)
- printk("%.2x ", data[i]);
- printk("\n");
- }
+ if (debug)
+ dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = %*ph\n",
+ function, size, size, data);
}
/* Use our own dbg macro */