summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-08-23 00:41:59 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-15 16:35:58 +0200
commit4ab79283aa749201aaee9e93a67285719bd2fec2 (patch)
treefb2655b69ff98e8dfe3155473a1451fc0f8f32aa
parent[media] au6610: define reset_resume (diff)
downloadlinux-4ab79283aa749201aaee9e93a67285719bd2fec2.tar.xz
linux-4ab79283aa749201aaee9e93a67285719bd2fec2.zip
[media] dvb_usb_v2: add debug macro dvb_usb_dbg_usb_control_msg
For dumping usb_control_msg(). Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/usb/dvb-usb-v2/dvb_usb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb.h b/drivers/media/usb/dvb-usb-v2/dvb_usb.h
index 5a53c6231fc2..bae16a1189d6 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb.h
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb.h
@@ -63,6 +63,17 @@
#define fe_to_priv(fe) (fe_to_d(fe)->priv)
#define d_to_priv(d) (d->priv)
+#define dvb_usb_dbg_usb_control_msg(udev, r, t, v, i, b, l) { \
+ char *direction; \
+ if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \
+ direction = ">>>"; \
+ else \
+ direction = "<<<"; \
+ dev_dbg(&udev->dev, "%s: %02x %02x %02x %02x %02x %02x %02x %02x " \
+ "%s %*ph\n", __func__, t, r, v & 0xff, v >> 8, \
+ i & 0xff, i >> 8, l & 0xff, l >> 8, direction, l, b); \
+}
+
#define DVB_USB_STREAM_BULK(endpoint_, count_, size_) { \
.type = USB_BULK, \
.count = count_, \