Skip to contentSkip to conversation

spi: dw: Replace dma_request_slave_channel() with dma_request_chan()

PATCH In review Andy Shevchenko 1 participant 2 messages Aug 28, 2020 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: dw: Replace dma_request_slave_channel() with dma_request_chan()

Drivers should use dma_request_chan() instead of dma_request_slave_channel().

dma_request_slave_channel() is a simple wrapper for dma_request_chan() eating up the error code for channel request failure and makes deferred probing impossible.

---
 drivers/spi/spi-dw-dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-dw-dma.c +2 -2
index bb390ff67d1d..afc2f11a3473 100644
@@ -107,11 +107,11 @@ static int dw_spi_dma_init_mfld(struct device *dev, struct dw_spi *dws)
 
 static int dw_spi_dma_init_generic(struct device *dev, struct dw_spi *dws)
 {
-	dws->rxchan = dma_request_slave_channel(dev, "rx");
+	dws->rxchan = dma_request_chan(dev, "rx");
 	if (!dws->rxchan)
 		return -ENODEV;
 
-	dws->txchan = dma_request_slave_channel(dev, "tx");
+	dws->txchan = dma_request_chan(dev, "tx");
 	if (!dws->txchan) {
 		dma_release_channel(dws->rxchan);
 		dws->rxchan = NULL;
Signature · 1 line
2.28.0
#1 lore raw
Quoted 5 lines · Andy Shevchenko

Drivers should use dma_request_chan() instead of dma_request_slave_channel().

dma_request_slave_channel() is a simple wrapper for dma_request_chan() eating up the error code for channel request failure and makes deferred probing impossible.

It's not fully correct change.

Signature · 2 lines
With Best Regards,
Andy Shevchenko