From patchwork Thu Jun 13 14:17:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 2717031 Return-Path: X-Original-To: patchwork-linux-arm@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 8CEED9F3B5 for ; Thu, 13 Jun 2013 14:18:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F5F020256 for ; Thu, 13 Jun 2013 14:18:48 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4018D2024E for ; Thu, 13 Jun 2013 14:18:47 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Un8Lu-0001OX-5z; Thu, 13 Jun 2013 14:18:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Un8Lk-0005yy-1W; Thu, 13 Jun 2013 14:18:04 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Un8LX-0005xD-BQ for linux-arm-kernel@lists.infradead.org; Thu, 13 Jun 2013 14:17:53 +0000 Received: from dbdlxv05.itg.ti.com ([172.24.171.60]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5DEHSKM022151; Thu, 13 Jun 2013 09:17:28 -0500 Received: from DBDE72.ent.ti.com (dbde72.ent.ti.com [172.24.171.97]) by dbdlxv05.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5DEHOsh015905; Thu, 13 Jun 2013 09:17:25 -0500 Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE72.ent.ti.com (172.24.171.97) with Microsoft SMTP Server id 14.2.342.3; Thu, 13 Jun 2013 22:17:23 +0800 Received: from ula0131687.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5DEHMqn002213; Thu, 13 Jun 2013 19:47:23 +0530 From: Rajendra Nayak To: Subject: [PATCH v2 1/3] ARM: OMAP: dma: Remove the wrong dev_id check Date: Thu, 13 Jun 2013 19:47:09 +0530 Message-ID: <1371133031-29229-2-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371133031-29229-1-git-send-email-rnayak@ti.com> References: <1371133031-29229-1-git-send-email-rnayak@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130613_101751_547844_B08C937C X-CRM114-Status: GOOD ( 10.40 ) X-Spam-Score: -7.3 (-------) Cc: R Sricharan , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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: R Sricharan Once a free channel is found, the check for dev_id == 0 does not make any sense. Get rid of it. Signed-off-by: R Sricharan --- arch/arm/plat-omap/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index e06c34b..2f99331 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -701,8 +701,8 @@ int omap_request_dma(int dev_id, const char *dev_name, for (ch = 0; ch < dma_chan_count; ch++) { if (free_ch == -1 && dma_chan[ch].dev_id == -1) { free_ch = ch; - if (dev_id == 0) - break; + /* Exit after first free channel found */ + break; } } if (free_ch == -1) {