From patchwork Wed Jun 29 14:09:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Ellis X-Patchwork-Id: 931752 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5U7Bkao006509 for ; Thu, 30 Jun 2011 07:11:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758430Ab1F3HLp (ORCPT ); Thu, 30 Jun 2011 03:11:45 -0400 Received: from us7.mainehost.net ([65.126.238.4]:39051 "EHLO us7.mainehost.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751523Ab1F3HLn (ORCPT ); Thu, 30 Jun 2011 03:11:43 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Jun 2011 07:11:46 +0000 (UTC) X-Greylist: delayed 11328 seconds by postgrey-1.27 at vger.kernel.org; Thu, 30 Jun 2011 03:11:43 EDT Received: from 173-162-152-37-newengland.hfc.comcastbusiness.net ([173.162.152.37] helo=[192.168.10.4]) by us7.mainehost.net with esmtpa (Exim 4.69) (envelope-from ) id 1QbvSQ-00017z-1R; Wed, 29 Jun 2011 10:09:34 -0400 Subject: [PATCH] DMA: OMAP: Remove extra looping from omap_request_dma From: Scott Ellis To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tony Lindgren , Russell King Date: Wed, 29 Jun 2011 10:09:09 -0400 Message-ID: <1309356549.3995.13.camel@quad> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - us7.mainehost.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jumpnowtek.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Break from dma channel search when a free one is found. Signed-off-by: Scott Ellis --- arch/arm/plat-omap/dma.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index c22217c..3d36fcf 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -678,10 +678,9 @@ int omap_request_dma(int dev_id, const char *dev_name, spin_lock_irqsave(&dma_chan_lock, flags); for (ch = 0; ch < dma_chan_count; ch++) { - if (free_ch == -1 && dma_chan[ch].dev_id == -1) { + if (dma_chan[ch].dev_id == -1) { free_ch = ch; - if (dev_id == 0) - break; + break; } } if (free_ch == -1) {