aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/spi-img-spfi.c
diff options
context:
space:
mode:
authorGravatar Mark Brown <broonie@kernel.org> 2020-01-23 12:37:18 +0000
committerGravatar Mark Brown <broonie@kernel.org> 2020-01-23 12:37:18 +0000
commit754a36a58c29718bf5e28b8789b17bffbb60e8a6 (patch)
treee0772eb7f3248ce030b52774e57f510f85933d58 /drivers/spi/spi-img-spfi.c
parentMerge branch 'spi-5.5' into spi-linus (diff)
parentdt-binding: spi: add NPCM PSPI reset binding (diff)
downloadlinux-754a36a58c29718bf5e28b8789b17bffbb60e8a6.tar.gz
linux-754a36a58c29718bf5e28b8789b17bffbb60e8a6.tar.bz2
linux-754a36a58c29718bf5e28b8789b17bffbb60e8a6.zip
Merge branch 'spi-5.6' into spi-next
Diffstat (limited to 'drivers/spi/spi-img-spfi.c')
-rw-r--r--drivers/spi/spi-img-spfi.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c
index f4a8f470aecc..8543f5ed1099 100644
--- a/drivers/spi/spi-img-spfi.c
+++ b/drivers/spi/spi-img-spfi.c
@@ -666,8 +666,22 @@ static int img_spfi_probe(struct platform_device *pdev)
master->unprepare_message = img_spfi_unprepare;
master->handle_err = img_spfi_handle_err;
- spfi->tx_ch = dma_request_slave_channel(spfi->dev, "tx");
- spfi->rx_ch = dma_request_slave_channel(spfi->dev, "rx");
+ spfi->tx_ch = dma_request_chan(spfi->dev, "tx");
+ if (IS_ERR(spfi->tx_ch)) {
+ ret = PTR_ERR(spfi->tx_ch);
+ spfi->tx_ch = NULL;
+ if (ret == -EPROBE_DEFER)
+ goto disable_pm;
+ }
+
+ spfi->rx_ch = dma_request_chan(spfi->dev, "rx");
+ if (IS_ERR(spfi->rx_ch)) {
+ ret = PTR_ERR(spfi->rx_ch);
+ spfi->rx_ch = NULL;
+ if (ret == -EPROBE_DEFER)
+ goto disable_pm;
+ }
+
if (!spfi->tx_ch || !spfi->rx_ch) {
if (spfi->tx_ch)
dma_release_channel(spfi->tx_ch);