diff options
author | R Sricharan <r.sricharan@ti.com> | 2013-06-13 10:17:10 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-06-18 03:09:26 -0400 |
commit | f0a3ff271779ba969415902f9426bfd2302dc4ba (patch) | |
tree | 2eef273ddcb712910c853379728ac2e6e41c19e8 /arch/arm/plat-omap | |
parent | 03a6d4a09968368029d34c5b3f5361e8548d8442 (diff) |
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>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 2f9933156465..8a71f7536f29 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -894,11 +894,12 @@ void omap_start_dma(int lch) | |||
894 | int next_lch, cur_lch; | 894 | int next_lch, cur_lch; |
895 | char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT]; | 895 | char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT]; |
896 | 896 | ||
897 | dma_chan_link_map[lch] = 1; | ||
898 | /* Set the link register of the first channel */ | 897 | /* Set the link register of the first channel */ |
899 | enable_lnk(lch); | 898 | enable_lnk(lch); |
900 | 899 | ||
901 | memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); | 900 | memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); |
901 | dma_chan_link_map[lch] = 1; | ||
902 | |||
902 | cur_lch = dma_chan[lch].next_lch; | 903 | cur_lch = dma_chan[lch].next_lch; |
903 | do { | 904 | do { |
904 | next_lch = dma_chan[cur_lch].next_lch; | 905 | next_lch = dma_chan[cur_lch].next_lch; |