[media] tm6000: Flesh out the IRQ callback
authorThierry Reding <thierry.reding@avionic-design.de>
Thu, 4 Aug 2011 07:14:06 +0000 (04:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 31 Aug 2011 20:17:13 +0000 (17:17 -0300)
This brings the IRQ callback implementation more in line with how other
drivers do it.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-video.c

index ba9cd24..bef6023 100644 (file)
@@ -513,9 +513,21 @@ static void tm6000_irq_callback(struct urb *urb)
        struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq);
        int i;
 
-       if (!dev)
+       switch (urb->status) {
+       case 0:
+       case -ETIMEDOUT:
+               break;
+
+       case -ECONNRESET:
+       case -ENOENT:
+       case -ESHUTDOWN:
                return;
 
+       default:
+               tm6000_err("urb completion error %d.\n", urb->status);
+               break;
+       }
+
        spin_lock(&dev->slock);
        tm6000_isoc_copy(urb);
        spin_unlock(&dev->slock);