diff options
author | Antti Palosaari <crope@iki.fi> | 2012-06-19 22:31:04 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-04 07:56:37 -0300 |
commit | 9f6f82ee61b23f0234fc83be363483bc4a65d99c (patch) | |
tree | 1b857ad408b42d0747b3a962bf35a64771f6fe0d /drivers | |
parent | 41a0abf7100928b412be4d35d62fd77c83064a9b (diff) |
[media] dvb_usb_v2: move dvb_usbv2_generic_rw() debugs behind define
It is nice to have this debug, but as it generates very huge amount
of traffic, better to make it conditional. Use define macro to disable
it as I did not find out how to use dynamic debugs to dump variable
length buffers like that.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb_usb_urb.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_urb.c b/drivers/media/dvb/dvb-usb/dvb_usb_urb.c index 75b7ac43810..e886362ccf7 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb_urb.c +++ b/drivers/media/dvb/dvb-usb/dvb_usb_urb.c @@ -8,6 +8,7 @@ */ #include "dvb_usb_common.h" +#undef DVB_USB_XFER_DEBUG int dvb_usbv2_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen, int delay_ms) { @@ -26,8 +27,10 @@ int dvb_usbv2_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, if (ret) return ret; +#ifdef DVB_USB_XFER_DEBUG print_hex_dump(KERN_DEBUG, KBUILD_MODNAME ": >>> ", DUMP_PREFIX_NONE, 32, 1, wbuf, wlen, 0); +#endif ret = usb_bulk_msg(d->udev, usb_sndbulkpipe(d->udev, d->props->generic_bulk_ctrl_endpoint), wbuf, wlen, @@ -53,10 +56,10 @@ int dvb_usbv2_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, if (ret) pr_err("%s: recv bulk message failed: %d\n", KBUILD_MODNAME, ret); - else - print_hex_dump(KERN_DEBUG, KBUILD_MODNAME ": <<< ", - DUMP_PREFIX_NONE, 32, 1, rbuf, actlen, - 0); +#ifdef DVB_USB_XFER_DEBUG + print_hex_dump(KERN_DEBUG, KBUILD_MODNAME ": <<< ", + DUMP_PREFIX_NONE, 32, 1, rbuf, actlen, 0); +#endif } mutex_unlock(&d->usb_mutex); |