]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
[media] stk1160: Make kill/free urb debug message more verbose
authorEzequiel Garcia <elezegarcia@gmail.com>
Mon, 20 Aug 2012 00:23:43 +0000 (21:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 25 Sep 2012 13:38:43 +0000 (10:38 -0300)
This is just a cleaning patch to produce more useful
debug messages.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/stk1160/stk1160-video.c

index 378526981146210f9afdfc88854e4b401c3abbfa..022092aab92439e4fa109b84b0f8e497299413ab 100644 (file)
@@ -342,18 +342,18 @@ static void stk1160_isoc_irq(struct urb *urb)
  */
 void stk1160_cancel_isoc(struct stk1160 *dev)
 {
-       int i;
+       int i, num_bufs = dev->isoc_ctl.num_bufs;
 
        /*
         * This check is not necessary, but we add it
         * to avoid a spurious debug message
         */
-       if (!dev->isoc_ctl.num_bufs)
+       if (!num_bufs)
                return;
 
-       stk1160_dbg("killing urbs...\n");
+       stk1160_dbg("killing %d urbs...\n", num_bufs);
 
-       for (i = 0; i < dev->isoc_ctl.num_bufs; i++) {
+       for (i = 0; i < num_bufs; i++) {
 
                /*
                 * To kill urbs we can't be in atomic context.
@@ -373,11 +373,11 @@ void stk1160_cancel_isoc(struct stk1160 *dev)
 void stk1160_free_isoc(struct stk1160 *dev)
 {
        struct urb *urb;
-       int i;
+       int i, num_bufs = dev->isoc_ctl.num_bufs;
 
-       stk1160_dbg("freeing urb buffers...\n");
+       stk1160_dbg("freeing %d urb buffers...\n", num_bufs);
 
-       for (i = 0; i < dev->isoc_ctl.num_bufs; i++) {
+       for (i = 0; i < num_bufs; i++) {
 
                urb = dev->isoc_ctl.urb[i];
                if (urb) {