diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2019-12-12 15:55:48 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-12-16 11:57:46 +0000 |
commit | b5756b777472eceaa84bc180f458f8eaec65da9a (patch) | |
tree | 5d20c3f9698cdf71f011f9d2fb0acac4dcfc61dc /drivers/spi | |
parent | 401abb764abb6e42f539528e02127457eb0c5b32 (diff) | |
download | linux-b5756b777472eceaa84bc180f458f8eaec65da9a.tar.gz linux-b5756b777472eceaa84bc180f458f8eaec65da9a.tar.bz2 linux-b5756b777472eceaa84bc180f458f8eaec65da9a.zip |
spi: spi-fsl-dspi: 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/20191212135550.4634-8-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-fsl-dspi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 442cff71a0d2..52ccd8397c35 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -395,17 +395,17 @@ static int dspi_request_dma(struct fsl_dspi *dspi, phys_addr_t phy_addr) if (!dma) return -ENOMEM; - dma->chan_rx = dma_request_slave_channel(dev, "rx"); - if (!dma->chan_rx) { + dma->chan_rx = dma_request_chan(dev, "rx"); + if (IS_ERR(dma->chan_rx)) { dev_err(dev, "rx dma channel not available\n"); - ret = -ENODEV; + ret = PTR_ERR(dma->chan_rx); return ret; } - dma->chan_tx = dma_request_slave_channel(dev, "tx"); - if (!dma->chan_tx) { + dma->chan_tx = dma_request_chan(dev, "tx"); + if (IS_ERR(dma->chan_tx)) { dev_err(dev, "tx dma channel not available\n"); - ret = -ENODEV; + ret = PTR_ERR(dma->chan_tx); goto err_tx_channel; } |