]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/blackfin/kernel/bfin_dma_5xx.c
Merge branches 'topic/fix/hda' and 'topic/fix/misc' into for-linus
[linux-2.6-omap-h63xx.git] / arch / blackfin / kernel / bfin_dma_5xx.c
index 93229b3d6e3e30da6bc17dd760bd48ddbacda0af..339293d677cc33608970e912476dad1040ab7ade 100644 (file)
@@ -117,15 +117,14 @@ int request_dma(unsigned int channel, char *device_id)
 
 #ifdef CONFIG_BF54x
        if (channel >= CH_UART2_RX && channel <= CH_UART3_TX) {
-               if (strncmp(device_id, "BFIN_UART", 9) == 0) {
-                       dma_ch[channel].regs->peripheral_map &= 0x0FFF;
-                       dma_ch[channel].regs->peripheral_map |=
+               unsigned int per_map;
+               per_map = dma_ch[channel].regs->peripheral_map & 0xFFF;
+               if (strncmp(device_id, "BFIN_UART", 9) == 0)
+                       dma_ch[channel].regs->peripheral_map = per_map |
                                ((channel - CH_UART2_RX + 0xC)<<12);
-               } else {
-                       dma_ch[channel].regs->peripheral_map &= 0x0FFF;
-                       dma_ch[channel].regs->peripheral_map |=
+               else
+                       dma_ch[channel].regs->peripheral_map = per_map |
                                ((channel - CH_UART2_RX + 0x6)<<12);
-               }
        }
 #endif