mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
dmaengine: jz4780: Use dma_get_slave_channel when requesting a specific channel
When the DT requests a specific channel to use it is not necesssary to scan through all DMA channels in the system. Just return the requested channel using dma_get_slave_channel(). Signed-off-by: Alex Smith <[email protected]> Cc: Vinod Koul <[email protected]> Cc: Zubair Lutfullah Kakakhel <[email protected]> Cc: [email protected] Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
839896ef3f
commit
d3273e10ad
1 changed files with 7 additions and 2 deletions
|
|
@ -726,9 +726,14 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec,
|
|||
data.channel);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return dma_request_channel(mask, jz4780_dma_filter_fn, &data);
|
||||
jzdma->chan[data.channel].transfer_type = data.transfer_type;
|
||||
|
||||
return dma_get_slave_channel(
|
||||
&jzdma->chan[data.channel].vchan.chan);
|
||||
} else {
|
||||
return dma_request_channel(mask, jz4780_dma_filter_fn, &data);
|
||||
}
|
||||
}
|
||||
|
||||
static int jz4780_dma_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue