mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
29e8c3c304
commit
538528de0c
1 changed files with 2 additions and 8 deletions
|
@ -1705,14 +1705,8 @@ static int omap2_dma_handle_ch(int ch)
|
|||
status = OMAP_DMA_CSR_REG(ch);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
if (likely(dma_chan[ch].callback != NULL))
|
||||
dma_chan[ch].callback(ch, status, dma_chan[ch].data);
|
||||
|
||||
OMAP_DMA_CSR_REG(ch) = status;
|
||||
|
||||
|
|
Loading…
Reference in a new issue