diff options
author | Alex Smith <alex.smith@imgtec.com> | 2015-07-24 12:24:23 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-08-18 12:58:49 -0400 |
commit | d3273e10ad871e903456a875e1062514cd13a244 (patch) | |
tree | 69f4276a6a873a400c9b94c9161cfa5c0dfde728 /drivers/dma/dma-jz4780.c | |
parent | 839896ef3fdacf3a27460b6f6dabc6ac1475a00c (diff) |
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 <alex.smith@imgtec.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dma-jz4780.c')
-rw-r--r-- | drivers/dma/dma-jz4780.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index e4a291c67e2a..40baaf00b971 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c | |||
@@ -726,9 +726,14 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, | |||
726 | data.channel); | 726 | data.channel); |
727 | return NULL; | 727 | return NULL; |
728 | } | 728 | } |
729 | } | ||
730 | 729 | ||
731 | return dma_request_channel(mask, jz4780_dma_filter_fn, &data); | 730 | jzdma->chan[data.channel].transfer_type = data.transfer_type; |
731 | |||
732 | return dma_get_slave_channel( | ||
733 | &jzdma->chan[data.channel].vchan.chan); | ||
734 | } else { | ||
735 | return dma_request_channel(mask, jz4780_dma_filter_fn, &data); | ||
736 | } | ||
732 | } | 737 | } |
733 | 738 | ||
734 | static int jz4780_dma_probe(struct platform_device *pdev) | 739 | static int jz4780_dma_probe(struct platform_device *pdev) |