ARM: OMAP: dma: Fix the dma_chan_link_map init order

Init dma_chan_link_map[lch] *after* its memset to 0.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
R Sricharan 2013-06-13 19:47:10 +05:30 committed by Tony Lindgren
parent 03a6d4a099
commit f0a3ff2717

View File

@ -894,11 +894,12 @@ void omap_start_dma(int lch)
int next_lch, cur_lch; int next_lch, cur_lch;
char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT]; char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT];
dma_chan_link_map[lch] = 1;
/* Set the link register of the first channel */ /* Set the link register of the first channel */
enable_lnk(lch); enable_lnk(lch);
memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
dma_chan_link_map[lch] = 1;
cur_lch = dma_chan[lch].next_lch; cur_lch = dma_chan[lch].next_lch;
do { do {
next_lch = dma_chan[cur_lch].next_lch; next_lch = dma_chan[cur_lch].next_lch;