Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Peter Ujfalusi and committed by
Michael Ellerman
fb185a40 1c7f4fe8

+3 -3
+3 -3
arch/powerpc/platforms/512x/mpc512x_lpbfifo.c
··· 434 434 memset(&lpbfifo, 0, sizeof(struct lpbfifo_data)); 435 435 spin_lock_init(&lpbfifo.lock); 436 436 437 - lpbfifo.chan = dma_request_slave_channel(&pdev->dev, "rx-tx"); 438 - if (lpbfifo.chan == NULL) 439 - return -EPROBE_DEFER; 437 + lpbfifo.chan = dma_request_chan(&pdev->dev, "rx-tx"); 438 + if (IS_ERR(lpbfifo.chan)) 439 + return PTR_ERR(lpbfifo.chan); 440 440 441 441 if (of_address_to_resource(pdev->dev.of_node, 0, &r) != 0) { 442 442 dev_err(&pdev->dev, "bad 'reg' in 'sclpc' device tree node\n");