]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[Blackfin] arch: Fix bug - Setting peripheral_map only when dma channel is UART2/3.
authorSonic Zhang <sonic.zhang@analog.com>
Mon, 25 Feb 2008 03:13:07 +0000 (11:13 +0800)
committerBryan Wu <cooloney@kernel.org>
Mon, 25 Feb 2008 03:13:07 +0000 (11:13 +0800)
Singed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/kernel/bfin_dma_5xx.c

index 5453bc3664fc40eb47474f8a2297c6ae7e0835ac..8fd5d22cec34d124dfedb031bcad84a4149a4b33 100644 (file)
@@ -105,13 +105,14 @@ int request_dma(unsigned int channel, char *device_id)
        mutex_unlock(&(dma_ch[channel].dmalock));
 
 #ifdef CONFIG_BF54x
-       if (channel >= CH_UART2_RX && channel <= CH_UART3_TX &&
-               strncmp(device_id, "BFIN_UART", 9) == 0)
-               dma_ch[channel].regs->peripheral_map |=
-                       (channel - CH_UART2_RX + 0xC);
-       else
-               dma_ch[channel].regs->peripheral_map |=
-                       (channel - CH_UART2_RX + 0x6);
+       if (channel >= CH_UART2_RX && channel <= CH_UART3_TX) {
+               if (strncmp(device_id, "BFIN_UART", 9) == 0)
+                       dma_ch[channel].regs->peripheral_map |=
+                               (channel - CH_UART2_RX + 0xC);
+               else
+                       dma_ch[channel].regs->peripheral_map |=
+                               (channel - CH_UART2_RX + 0x6);
+       }
 #endif
 
        dma_ch[channel].device_id = device_id;