diff options
author | Stefan Hajnoczi <stefanha@gmail.com> | 2013-01-19 08:59:00 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-20 23:56:59 (GMT) |
commit | 98115f1df394706556bd03e20418fa50e42e04dd (patch) | |
tree | 97def6d4c02c0262ef2a4c67705288fab75e342f /drivers/staging/line6/driver.c | |
parent | 25c97da8b975d8717a0242c651896b56b2696060 (diff) | |
download | linux-fsl-qoriq-98115f1df394706556bd03e20418fa50e42e04dd.tar.xz |
staging: line6: drop CONFIG_LINE6_USB_DUMP_PCM
The CONFIG_LINE6_USB_DUMP_PCM config option prints a hexdump of PCM
audio data as URBs are sent and received. The usbmon feature should be
used instead of manually dumping PCM URBs. There are a few advantages
to using usbmon:
* Can be turned on/off at runtime
* Provides full USB-level traffic
* tcpdump and wireshark support for powerful analysis
* No driver-specific code is required
This is the last user of line6_write_hexdump() so we drop it too.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/line6/driver.c')
-rw-r--r-- | drivers/staging/line6/driver.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index 1b05633..9f9a21a 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c @@ -135,47 +135,6 @@ static void line6_stop_listen(struct usb_line6 *line6) usb_kill_urb(line6->urb_listen); } -#ifdef CONFIG_LINE6_USB_DUMP_ANY -/* - Write hexdump to syslog. -*/ -void line6_write_hexdump(struct usb_line6 *line6, char dir, - const unsigned char *buffer, int size) -{ - static const int BYTES_PER_LINE = 8; - char hexdump[100]; - char asc[BYTES_PER_LINE + 1]; - int i, j; - - for (i = 0; i < size; i += BYTES_PER_LINE) { - int hexdumpsize = sizeof(hexdump); - char *p = hexdump; - int n = min(size - i, BYTES_PER_LINE); - asc[n] = 0; - - for (j = 0; j < BYTES_PER_LINE; ++j) { - int bytes; - - if (j < n) { - unsigned char val = buffer[i + j]; - bytes = snprintf(p, hexdumpsize, " %02X", val); - asc[j] = ((val >= 0x20) - && (val < 0x7f)) ? val : '.'; - } else - bytes = snprintf(p, hexdumpsize, " "); - - if (bytes > hexdumpsize) - break; /* buffer overflow */ - - p += bytes; - hexdumpsize -= bytes; - } - - dev_info(line6->ifcdev, "%c%04X:%s %s\n", dir, i, hexdump, asc); - } -} -#endif - /* Send raw message in pieces of wMaxPacketSize bytes. */ |