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.mar...@vista-silicon.com>
---
 drivers/media/video/mx2_camera.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 34b43a4..d9028f1 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -1302,7 +1302,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 */
@@ -1327,7 +1331,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);
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to