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

mmc: owl-mmc: 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/20191217112934.31535-1-peter.ujfalusi@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Peter Ujfalusi and committed by
Ulf Hansson
2e2d12e1 972a2dd6

+3 -3
+3 -3
drivers/mmc/host/owl-mmc.c
··· 616 616 617 617 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); 618 618 pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; 619 - owl_host->dma = dma_request_slave_channel(&pdev->dev, "mmc"); 620 - if (!owl_host->dma) { 619 + owl_host->dma = dma_request_chan(&pdev->dev, "mmc"); 620 + if (IS_ERR(owl_host->dma)) { 621 621 dev_err(owl_host->dev, "Failed to get external DMA channel.\n"); 622 - ret = -ENXIO; 622 + ret = PTR_ERR(owl_host->dma); 623 623 goto err_free_host; 624 624 } 625 625