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: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191217073730.21249-1-peter.ujfalusi@ti.com
This commit is contained in:
Peter Ujfalusi 2019-12-17 09:37:30 +02:00 committed by Michael Ellerman
parent 1c7f4fe86f
commit fb185a4052

View file

@ -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");