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

Commit d3273e10 authored by Alex Smith's avatar Alex Smith Committed by Vinod Koul
Browse files

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: default avatarAlex 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: default avatarVinod Koul <vinod.koul@intel.com>
parent 839896ef
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -726,10 +726,15 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec,
				data.channel);
			return NULL;
		}
	}

		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)
{