[PATCH 2/4] mx2_camera: return IRQ_NONE when doing nothing

Baruch Siach baruch at tkos.co.il
Tue Jul 27 08:06:08 EDT 2010


Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 drivers/media/video/mx2_camera.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 1536bd4..b42ad8d 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -420,15 +420,17 @@ static irqreturn_t mx25_camera_irq(int irq_csi, void *data)
 	struct mx2_camera_dev *pcdev = data;
 	u32 status = readl(pcdev->base_csi + CSISR);
 
-	if (status & CSISR_DMA_TSF_FB1_INT)
+	writel(status, pcdev->base_csi + CSISR);
+
+	if (!(status & (CSISR_DMA_TSF_FB1_INT | CSISR_DMA_TSF_FB2_INT)))
+		return IRQ_NONE;
+	else if (status & CSISR_DMA_TSF_FB1_INT)
 		mx25_camera_frame_done(pcdev, 1, VIDEOBUF_DONE);
 	else if (status & CSISR_DMA_TSF_FB2_INT)
 		mx25_camera_frame_done(pcdev, 2, VIDEOBUF_DONE);
 
 	/* FIXME: handle CSISR_RFF_OR_INT */
 
-	writel(status, pcdev->base_csi + CSISR);
-
 	return IRQ_HANDLED;
 }
 
-- 
1.7.1




More information about the linux-arm-kernel mailing list