From patchwork Mon Jun 17 15:20:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2734661 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8D0AB9F39E for ; Mon, 17 Jun 2013 15:25:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE39A203E5 for ; Mon, 17 Jun 2013 15:25:35 +0000 (UTC) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF589203EC for ; Mon, 17 Jun 2013 15:25:33 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5HFOTJw017437; Mon, 17 Jun 2013 10:24:29 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5HFOSQ2016747; Mon, 17 Jun 2013 10:24:29 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Mon, 17 Jun 2013 10:24:28 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5HFOS0I003367; Mon, 17 Jun 2013 10:24:28 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 5845D8062C; Mon, 17 Jun 2013 10:24:28 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 97FF980626 for ; Mon, 17 Jun 2013 10:21:58 -0500 (CDT) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5HFLw46019917 for ; Mon, 17 Jun 2013 10:21:58 -0500 (CDT) Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by medina.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5HFLvOD027540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Jun 2013 10:21:58 -0500 Received: from [216.82.242.131:4081] by server-12.bemta-8.messagelabs.com id 3C/A0-06982-5992FB15; Mon, 17 Jun 2013 15:21:57 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-14.tower-76.messagelabs.com!1371482515!31686556!1 X-Originating-IP: [209.85.192.171] X-SpamReason: No, hits=0.2 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, RCVD_ILLEGAL_IP,spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19977 invoked from network); 17 Jun 2013 15:21:56 -0000 Received: from mail-pd0-f171.google.com (HELO mail-pd0-f171.google.com) (209.85.192.171) by server-14.tower-76.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2013 15:21:56 -0000 Received: by mail-pd0-f171.google.com with SMTP id y14so2920226pdi.16 for ; Mon, 17 Jun 2013 08:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=tBL5s8G3Rj9FxkvZKDS+6pVxHSpeAxKwjgS2BDhSRwM=; b=vI9ndY/4owFxmC+XNIZSVaf3jyVT/hXeZc0C3dtJVAAQ6SDbk9wMrjvytXMOwRDOcw HidB7JEJ0FEzEE3Xec0PEKfHsOM4QF5ttMsejcrpX7UhPGkCICRRUFy1ocq8uLAhpHC8 MddmRcuatldQ0cNMU457Z+N/GMx1ew8kfrtw5z3Im3gPN6G/N6kb3+KnnUUKPGqObpMM BaoBS6qq7jmFxAqvSKUIxnpUPjWgKV5J9AclA2cYO5ylHEmjNkxq26Vspu3zObKa9bSl cjzdQ+navpxowDEkVeAY6eXKFs61KGmRjIPQ+bxKuhww8u6LGOzFlpFPldvSMsRx5EGa H+BQ== X-Received: by 10.66.190.234 with SMTP id gt10mr13608642pac.136.1371482515241; Mon, 17 Jun 2013 08:21:55 -0700 (PDT) Received: from localhost.localdomain ([1.23.210.59]) by mx.google.com with ESMTPSA id fp2sm14187573pbb.36.2013.06.17.08.21.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 08:21:54 -0700 (PDT) From: Prabhakar Lad To: Mauro Carvalho Chehab , LMML , DLOS , Hans Verkuil , Laurent Pinchart Subject: [PATCH v4 07/11] media: davinci: vpif_capture: remove unnecessary loop for IRQ resource Date: Mon, 17 Jun 2013 20:50:47 +0530 Message-ID: <1371482451-18314-8-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371482451-18314-1-git-send-email-prabhakar.csengg@gmail.com> References: <1371482451-18314-1-git-send-email-prabhakar.csengg@gmail.com> CC: LKML X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Lad, Prabhakar" For vpif capture driver each IRQ resource contains a single IRQ so drop the second loop. Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpif_capture.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index a4e0eab..5514175 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -2015,16 +2015,13 @@ static __init int vpif_probe(struct platform_device *pdev) } while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) { - for (i = res->start; i <= res->end; i++) { - err = devm_request_irq(&pdev->dev, i, vpif_channel_isr, - IRQF_SHARED, "VPIF_Capture", - (void *)(&vpif_obj.dev[res_idx]-> - channel_id)); - if (err) { - err = -EINVAL; - goto vpif_unregister; - - } + err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr, + IRQF_SHARED, "VPIF_Capture", + (void *)(&vpif_obj.dev[res_idx]-> + channel_id)); + if (err) { + err = -EINVAL; + goto vpif_unregister; } res_idx++; }