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

mmc: pxamci: 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>
Link: https://lore.kernel.org/r/20191217113004.31688-1-peter.ujfalusi@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Peter Ujfalusi and committed by
Ulf Hansson
e1ebb456 2e2d12e1

+8 -6
+8 -6
drivers/mmc/host/pxamci.c
··· 710 710 711 711 platform_set_drvdata(pdev, mmc); 712 712 713 - host->dma_chan_rx = dma_request_slave_channel(dev, "rx"); 714 - if (host->dma_chan_rx == NULL) { 713 + host->dma_chan_rx = dma_request_chan(dev, "rx"); 714 + if (IS_ERR(host->dma_chan_rx)) { 715 715 dev_err(dev, "unable to request rx dma channel\n"); 716 - ret = -ENODEV; 716 + ret = PTR_ERR(host->dma_chan_rx); 717 + host->dma_chan_rx = NULL; 717 718 goto out; 718 719 } 719 720 720 - host->dma_chan_tx = dma_request_slave_channel(dev, "tx"); 721 - if (host->dma_chan_tx == NULL) { 721 + host->dma_chan_tx = dma_request_chan(dev, "tx"); 722 + if (IS_ERR(host->dma_chan_tx)) { 722 723 dev_err(dev, "unable to request tx dma channel\n"); 723 - ret = -ENODEV; 724 + ret = PTR_ERR(host->dma_chan_tx); 725 + host->dma_chan_tx = NULL; 724 726 goto out; 725 727 } 726 728