ARM: OMAP: dma: Fix the dma_chan_link_map init order
[pandora-kernel.git] / arch / arm / plat-omap / dma.c
index c9b5253..e3e3559 100644 (file)
@@ -882,11 +882,12 @@ void omap_start_dma(int lch)
                int next_lch, cur_lch;
                char dma_chan_link_map[dma_lch_count];
 
-               dma_chan_link_map[lch] = 1;
                /* Set the link register of the first channel */
                enable_lnk(lch);
 
                memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
+               dma_chan_link_map[lch] = 1;
+
                cur_lch = dma_chan[lch].next_lch;
                do {
                        next_lch = dma_chan[cur_lch].next_lch;