From 0692f05dffaac5fc7b152f9b83625d3077639eba Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 17 Mar 2008 17:01:10 +0200 Subject: ARM: OMAP: DMA: Fix incorrect channel linking Function enable_lnk does incorrect channel link on non-omap1 builds if chain is created manually with omap_request_dma and omap_dma_link_lch functions. Fix this by making sure that next_linked_ch field is initialized to -1 just in omap_request_dma. Signed-off-by: Jarkko Nikula Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 7937406..c00eda5 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -604,6 +604,7 @@ int omap_request_dma(int dev_id, const char *dev_name, chan->data = data; #ifndef CONFIG_ARCH_OMAP1 chan->chain_id = -1; + chan->next_linked_ch = -1; #endif chan->enabled_irqs = OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ; @@ -1087,7 +1088,6 @@ int omap_request_dma_chain(int dev_id, const char *dev_name, printk(KERN_ERR "omap_dma: Request failed %d\n", err); return err; } - dma_chan[channels[i]].next_linked_ch = -1; dma_chan[channels[i]].prev_linked_ch = -1; dma_chan[channels[i]].state = DMA_CH_NOTSTARTED; -- cgit v1.1