]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] dvb_usb_v2: use dvb_usb_dbg_usb_control_msg()
authorAntti Palosaari <crope@iki.fi>
Wed, 22 Aug 2012 22:42:00 +0000 (19:42 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 15 Sep 2012 14:35:59 +0000 (11:35 -0300)
Convert drivers: au6610, ce6230, ec168, rtl28xxu for
dvb_usb_dbg_usb_control_msg() macro.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/dvb-usb-v2/au6610.c
drivers/media/usb/dvb-usb-v2/ce6230.c
drivers/media/usb/dvb-usb-v2/ce6230.h
drivers/media/usb/dvb-usb-v2/ec168.c
drivers/media/usb/dvb-usb-v2/ec168.h
drivers/media/usb/dvb-usb-v2/rtl28xxu.c
drivers/media/usb/dvb-usb-v2/rtl28xxu.h

index c126b7005c19c3a3b4bee9b9ee9c3b4a95cd12e0..f309fd8217fd3a1305982e7582e89b710e52abb1 100644 (file)
@@ -56,6 +56,11 @@ static int au6610_usb_msg(struct dvb_usb_device *d, u8 operation, u8 addr,
        ret = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), operation,
                              USB_TYPE_VENDOR|USB_DIR_IN, addr << 1, index,
                              usb_buf, 6, AU6610_USB_TIMEOUT);
+
+       dvb_usb_dbg_usb_control_msg(d->udev, operation,
+                       (USB_TYPE_VENDOR|USB_DIR_IN), addr << 1, index,
+                       usb_buf, 6);
+
        if (ret < 0)
                goto error;
 
index 819db9c01d5d5b6de317a5becf1594da1b9ab1bc..1c4357d804ff42c179771f30a33a9c950fb3ee37 100644 (file)
@@ -74,8 +74,8 @@ static int ce6230_ctrl_msg(struct dvb_usb_device *d, struct usb_req *req)
        ret = usb_control_msg(d->udev, pipe, request, requesttype, value, index,
                        buf, req->data_len, CE6230_USB_TIMEOUT);
 
-       ce6230_debug_dump(request, requesttype, value, index, buf,
-                       req->data_len);
+       dvb_usb_dbg_usb_control_msg(d->udev, request, requesttype, value, index,
+                       buf, req->data_len);
 
        if (ret < 0)
                pr_err("%s: usb_control_msg() failed=%d\n", KBUILD_MODNAME,
index 42d754494a3afa25c3aac946abf9e3be1e6c9192..299e57e3390b8714549b867bf67df3adc02f6b24 100644 (file)
 #include "zl10353.h"
 #include "mxl5005s.h"
 
-#define ce6230_debug_dump(r, t, v, i, b, l) { \
-       char *direction; \
-       if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \
-               direction = ">>>"; \
-       else \
-               direction = "<<<"; \
-       pr_debug("%s: %02x %02x %02x %02x %02x %02x %02x %02x %s [%d bytes]\n", \
-                        __func__, t, r, v & 0xff, v >> 8, i & 0xff, i >> 8, \
-                       l & 0xff, l >> 8, direction, l); \
-}
-
 #define CE6230_USB_TIMEOUT 1000
 
 struct usb_req {
index ab77622c383dff9cd1af86338c61cefaa9689956..b74c810e7decb952d0968c8f6d3da74f171cabba 100644 (file)
@@ -86,8 +86,8 @@ static int ec168_ctrl_msg(struct dvb_usb_device *d, struct ec168_req *req)
        ret = usb_control_msg(d->udev, pipe, request, requesttype, req->value,
                req->index, buf, req->size, EC168_USB_TIMEOUT);
 
-       ec168_debug_dump(request, requesttype, req->value, req->index, buf,
-               req->size);
+       dvb_usb_dbg_usb_control_msg(d->udev, request, requesttype, req->value,
+                       req->index, buf, req->size);
 
        if (ret < 0)
                goto err_dealloc;
index 9181236f6ebccea81d95b7c4f2eb6c6775df0e89..f65180822acb6ad80ad92a43ce4bfb7bd6c44196 100644 (file)
 
 #include "dvb_usb.h"
 
-#define ec168_debug_dump(r, t, v, i, b, l) { \
-       char *direction; \
-       if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \
-               direction = ">>>"; \
-       else \
-               direction = "<<<"; \
-       pr_debug("%s: %02x %02x %02x %02x %02x %02x %02x %02x %s\n", \
-                        __func__, t, r, v & 0xff, v >> 8, i & 0xff, i >> 8, \
-                       l & 0xff, l >> 8, direction); \
-}
-
 #define EC168_USB_TIMEOUT 1000
 
 struct ec168_req {
index c246c50be6295c6ecfebf94b8b383e63a1ee9796..e29fca2ba1250d98780ad097574e484205bedd95 100644 (file)
@@ -59,11 +59,13 @@ static int rtl28xxu_ctrl_msg(struct dvb_usb_device *d, struct rtl28xxu_req *req)
 
        ret = usb_control_msg(d->udev, pipe, 0, requesttype, req->value,
                        req->index, buf, req->size, 1000);
+
+       dvb_usb_dbg_usb_control_msg(d->udev, 0, requesttype, req->value,
+                       req->index, buf, req->size);
+
        if (ret > 0)
                ret = 0;
 
-       deb_dump(0, requesttype, req->value, req->index, buf, req->size);
-
        /* read request, copy returned data to return buf */
        if (!ret && requesttype == (USB_TYPE_VENDOR | USB_DIR_IN))
                memcpy(req->data, buf, req->size);
index 575edbf13a925dc86a46501caf212981e6b24890..035a9c890ce5d50203f0c05e00f2231fcaa3e3b6 100644 (file)
 
 #include "dvb_usb.h"
 
-#define deb_dump(r, t, v, i, b, l) { \
-       char *direction; \
-       if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \
-               direction = ">>>"; \
-       else \
-               direction = "<<<"; \
-       dev_dbg(&d->udev->dev, "%s: %02x %02x %02x %02x %02x %02x %02x %02x " \
-                       "%s [%d bytes]\n",  __func__, t, r, v & 0xff, v >> 8, \
-                       i & 0xff, i >> 8, l & 0xff, l >> 8, direction, l); \
-}
-
 /*
  * USB commands
  * (usb_control_msg() index parameter)