diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-06 14:59:18 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-06 14:59:18 -0400 |
commit | 5047f09b56d0bc3c21aec9cb16de60283da645c6 (patch) | |
tree | 09a07554b933c3bb912ce3bfc0ea7c7e1f16041c /arch/arm/mach-pxa/dma.c | |
parent | c0f1fe00c3923135b2c2f443448585482da8a53e (diff) | |
parent | 5528e568a760442e0ec8fd2dea1f0791875a066b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'arch/arm/mach-pxa/dma.c')
-rw-r--r-- | arch/arm/mach-pxa/dma.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c index 458112b21e25..7d8c85486c66 100644 --- a/arch/arm/mach-pxa/dma.c +++ b/arch/arm/mach-pxa/dma.c | |||
@@ -45,23 +45,16 @@ int pxa_request_dma (char *name, pxa_dma_prio prio, | |||
45 | 45 | ||
46 | local_irq_save(flags); | 46 | local_irq_save(flags); |
47 | 47 | ||
48 | /* try grabbing a DMA channel with the requested priority */ | 48 | do { |
49 | for (i = prio; i < prio + PXA_DMA_NBCH(prio); i++) { | 49 | /* try grabbing a DMA channel with the requested priority */ |
50 | if (!dma_channels[i].name) { | 50 | pxa_for_each_dma_prio (i, prio) { |
51 | found = 1; | ||
52 | break; | ||
53 | } | ||
54 | } | ||
55 | |||
56 | if (!found) { | ||
57 | /* requested prio group is full, try hier priorities */ | ||
58 | for (i = prio-1; i >= 0; i--) { | ||
59 | if (!dma_channels[i].name) { | 51 | if (!dma_channels[i].name) { |
60 | found = 1; | 52 | found = 1; |
61 | break; | 53 | break; |
62 | } | 54 | } |
63 | } | 55 | } |
64 | } | 56 | /* if requested prio group is full, try a hier priority */ |
57 | } while (!found && prio--); | ||
65 | 58 | ||
66 | if (found) { | 59 | if (found) { |
67 | DCSR(i) = DCSR_STARTINTR|DCSR_ENDINTR|DCSR_BUSERR; | 60 | DCSR(i) = DCSR_STARTINTR|DCSR_ENDINTR|DCSR_BUSERR; |