Commit 538528de authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Tony Lindgren

ARM: OMAP: Pass logical DMA channel number always to callback handlers

This makes parameter passing to DMA handlers uniform between non-chained
and chained transfers and makes debugging easier. Additional data like
chain_id can be always passed to handlers via callback data if needed.
Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 29e8c3c3
...@@ -1705,15 +1705,9 @@ static int omap2_dma_handle_ch(int ch) ...@@ -1705,15 +1705,9 @@ static int omap2_dma_handle_ch(int ch)
status = OMAP_DMA_CSR_REG(ch); status = OMAP_DMA_CSR_REG(ch);
} }
if (likely(dma_chan[ch].callback != NULL)) { if (likely(dma_chan[ch].callback != NULL))
if (dma_chan[ch].chain_id != -1)
dma_chan[ch].callback(dma_chan[ch].chain_id, status,
dma_chan[ch].data);
else
dma_chan[ch].callback(ch, status, dma_chan[ch].data); dma_chan[ch].callback(ch, status, dma_chan[ch].data);
}
OMAP_DMA_CSR_REG(ch) = status; OMAP_DMA_CSR_REG(ch) = status;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment