lkml.org 
[lkml]   [2011]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] DMA: OMAP: Remove extra looping from omap_request_dma
* Scott Ellis <scott@jumpnowtek.com> [110629 20:58]:
> Break from dma channel search when a free one is found.

Care to describe how the current code is not finding a
free channel currently?

Tony


> Signed-off-by: Scott Ellis <scott@jumpnowtek.com>
> ---
> arch/arm/plat-omap/dma.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> 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) {
>


\
 
 \ /
  Last update: 2011-07-01 09:21    [W:0.032 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site