ARM: OMAP: dma: Remove the wrong dev_id check
authorR Sricharan <r.sricharan@ti.com>
Thu, 13 Jun 2013 14:17:09 +0000 (19:47 +0530)
committerTony Lindgren <tony@atomide.com>
Tue, 18 Jun 2013 07:08:42 +0000 (00:08 -0700)
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 <r.sricharan@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/dma.c

index e06c34bdc34aa11c2bcac80097391dddfb552f5d..2f993315646522b30db6d8edd0e07c0dd09be31f 100644 (file)
@@ -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) {