diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2019-12-17 14:26:56 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-12-19 10:19:42 +0300 |
commit | c1fce225220dcfe8ba855b2373518fed9ea3e510 (patch) | |
tree | 15628d90a35e20b535ed4d370c2ce1f80f9cd80d /drivers/mmc/host/dw_mmc.c | |
parent | 9f606f11ea98c7a34c9e8c7405ec80ef3572ce69 (diff) | |
download | linux-c1fce225220dcfe8ba855b2373518fed9ea3e510.tar.xz |
mmc: dw_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/20191217112656.30860-1-peter.ujfalusi@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index fc9d4d000f97..bc5278ab5707 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -833,12 +833,14 @@ static int dw_mci_edmac_init(struct dw_mci *host) if (!host->dms) return -ENOMEM; - host->dms->ch = dma_request_slave_channel(host->dev, "rx-tx"); - if (!host->dms->ch) { + host->dms->ch = dma_request_chan(host->dev, "rx-tx"); + if (IS_ERR(host->dms->ch)) { + int ret = PTR_ERR(host->dms->ch); + dev_err(host->dev, "Failed to get external DMA channel.\n"); kfree(host->dms); host->dms = NULL; - return -ENXIO; + return ret; } return 0; |