From patchwork Tue Jul 27 12:06:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 114517 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6RC7AiU023786 for ; Tue, 27 Jul 2010 12:07:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753108Ab0G0MHI (ORCPT ); Tue, 27 Jul 2010 08:07:08 -0400 Received: from tango.tkos.co.il ([62.219.50.35]:41511 "EHLO tango.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753046Ab0G0MHH (ORCPT ); Tue, 27 Jul 2010 08:07:07 -0400 Received: from jasper (89-139-46-109.bb.netvision.net.il [89.139.46.109]) (authenticated bits=0) by tango.tkos.co.il (8.14.4/8.12.11) with ESMTP id o6RC6aEo030070; Tue, 27 Jul 2010 15:06:41 +0300 From: Baruch Siach To: Linux Media Mailing List Cc: Michael Grzeschik , linux-arm-kernel@lists.infradead.org, Sascha Hauer , Baruch Siach Subject: [PATCH 2/4] mx2_camera: return IRQ_NONE when doing nothing Date: Tue, 27 Jul 2010 15:06:08 +0300 Message-Id: <49da2476310a921b19226d572503b7c04175204d.1280229966.git.baruch@tkos.co.il> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: X-Spam-Level: -2.212 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.62 on 62.219.50.35 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 27 Jul 2010 12:07:10 +0000 (UTC) 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; }