Skip to content

Commit

Permalink
[media] dvb_usb_v2: add debug macro dvb_usb_dbg_usb_control_msg
Browse files Browse the repository at this point in the history
For dumping usb_control_msg().

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Sep 15, 2012
1 parent f5a8a78 commit 4ab7928
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/media/usb/dvb-usb-v2/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_, \
Expand Down

0 comments on commit 4ab7928

Please sign in to comment.