[media] media: i.MX27 camera: return IRQ_NONE if no IRQ status bit is set
authorJavier Martin <javier.martin@vista-silicon.com>
Mon, 13 Feb 2012 13:51:53 +0000 (10:51 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Mar 2012 12:45:06 +0000 (09:45 -0300)
If active_bufs() list is empty and no IRQ status bit is set
we are probably dealing with a share IRQ. Return IRQ_NONE in
this case.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mx2_camera.c

index d555b6eccb82f74e966223997eb9e9516f749782..1a8e4676c8a70d6bc8243b4d4633304dc84b2694 100644 (file)
@@ -1292,7 +1292,11 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
        if (list_empty(&pcdev->active_bufs)) {
                dev_warn(pcdev->dev, "%s: called while active list is empty\n",
                        __func__);
-               goto irq_ok;
+
+               if (!status) {
+                       spin_unlock(&pcdev->lock);
+                       return IRQ_NONE;
+               }
        }
 
        if (status & (1 << 7)) { /* overflow */
@@ -1323,7 +1327,6 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
                mx27_camera_frame_done_emma(pcdev, 1, false);
        }
 
-irq_ok:
        spin_unlock(&pcdev->lock);
        writel(status, pcdev->base_emma + PRP_INTRSTATUS);