Commit fb185a40 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Michael Ellerman
Browse files

powerpc/512x: Use dma_request_chan() instead dma_request_slave_channel()



dma_request_slave_channel() is a wrapper on top of dma_request_chan()
eating up the error code.

By using dma_request_chan() directly the driver can support deferred
probing against DMA.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191217073730.21249-1-peter.ujfalusi@ti.com
parent 1c7f4fe8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -434,9 +434,9 @@ static int mpc512x_lpbfifo_probe(struct platform_device *pdev)
	memset(&lpbfifo, 0, sizeof(struct lpbfifo_data));
	spin_lock_init(&lpbfifo.lock);

	lpbfifo.chan = dma_request_slave_channel(&pdev->dev, "rx-tx");
	if (lpbfifo.chan == NULL)
		return -EPROBE_DEFER;
	lpbfifo.chan = dma_request_chan(&pdev->dev, "rx-tx");
	if (IS_ERR(lpbfifo.chan))
		return PTR_ERR(lpbfifo.chan);

	if (of_address_to_resource(pdev->dev.of_node, 0, &r) != 0) {
		dev_err(&pdev->dev, "bad 'reg' in 'sclpc' device tree node\n");