Commit c3b2a021 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Ulf Hansson

mmc: mxcmmc: 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>
Link: https://lore.kernel.org/r/20191217112803.31161-1-peter.ujfalusi@ti.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 716d0205
...@@ -1121,7 +1121,16 @@ static int mxcmci_probe(struct platform_device *pdev) ...@@ -1121,7 +1121,16 @@ static int mxcmci_probe(struct platform_device *pdev)
mxcmci_writel(host, host->default_irq_mask, MMC_REG_INT_CNTR); mxcmci_writel(host, host->default_irq_mask, MMC_REG_INT_CNTR);
if (!host->pdata) { if (!host->pdata) {
host->dma = dma_request_slave_channel(&pdev->dev, "rx-tx"); host->dma = dma_request_chan(&pdev->dev, "rx-tx");
if (IS_ERR(host->dma)) {
if (PTR_ERR(host->dma) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
goto out_clk_put;
}
/* Ignore errors to fall back to PIO mode */
host->dma = NULL;
}
} else { } else {
res = platform_get_resource(pdev, IORESOURCE_DMA, 0); res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
if (res) { if (res) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment