Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35202451 authored by Maxime Ripard's avatar Maxime Ripard Committed by Vinod Koul
Browse files

dmaengine: sirf: Remove chancnt affectations



chanctnt is already filled by dma_async_device_register, which uses the channel
list to know how much channels there is.

Since it's already filled, we can safely remove it from the drivers' probe
function.

Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 1e916474
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -735,7 +735,6 @@ static int sirfsoc_dma_probe(struct platform_device *op)


	dma = &sdma->dma;
	dma = &sdma->dma;
	dma->dev = dev;
	dma->dev = dev;
	dma->chancnt = SIRFSOC_DMA_CHANNELS;


	dma->device_alloc_chan_resources = sirfsoc_dma_alloc_chan_resources;
	dma->device_alloc_chan_resources = sirfsoc_dma_alloc_chan_resources;
	dma->device_free_chan_resources = sirfsoc_dma_free_chan_resources;
	dma->device_free_chan_resources = sirfsoc_dma_free_chan_resources;
@@ -752,7 +751,7 @@ static int sirfsoc_dma_probe(struct platform_device *op)
	dma_cap_set(DMA_INTERLEAVE, dma->cap_mask);
	dma_cap_set(DMA_INTERLEAVE, dma->cap_mask);
	dma_cap_set(DMA_PRIVATE, dma->cap_mask);
	dma_cap_set(DMA_PRIVATE, dma->cap_mask);


	for (i = 0; i < dma->chancnt; i++) {
	for (i = 0; i < SIRFSOC_DMA_CHANNELS; i++) {
		schan = &sdma->channels[i];
		schan = &sdma->channels[i];


		schan->chan.device = dma;
		schan->chan.device = dma;