aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-s3c24xx/dma.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index f65192d5b1d7..f0ea7943ac5a 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1403,11 +1403,13 @@ static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel)
1403 ord = &dma_order->channels[channel]; 1403 ord = &dma_order->channels[channel];
1404 1404
1405 for (ch = 0; ch < dma_channels; ch++) { 1405 for (ch = 0; ch < dma_channels; ch++) {
1406 int tmp;
1406 if (!is_channel_valid(ord->list[ch])) 1407 if (!is_channel_valid(ord->list[ch]))
1407 continue; 1408 continue;
1408 1409
1409 if (s3c2410_chans[ord->list[ch]].in_use == 0) { 1410 tmp = ord->list[ch] & ~DMA_CH_VALID;
1410 ch = ord->list[ch] & ~DMA_CH_VALID; 1411 if (s3c2410_chans[tmp].in_use == 0) {
1412 ch = tmp;
1411 goto found; 1413 goto found;
1412 } 1414 }
1413 } 1415 }