Skip to content

Commit

Permalink
USB: serial: move usb_serial_debug_data to use %*ph
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Sep 13, 2012
1 parent b183c19 commit 1db9e45
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions include/linux/usb/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 1db9e45

Please sign in to comment.