Skip to contentSkip to conversation

ASoC: core: Replace dma_request_slave_channel() with dma_request_chan()

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

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: core: 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.

---
 sound/soc/soc-generic-dmaengine-pcm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/soc-generic-dmaengine-pcm.c +1 -2
index fb95c1464e66..ab13e08cd636 100644
@@ -249,8 +249,7 @@ static int dmaengine_pcm_new(struct snd_soc_component *component,
 			continue;
 
 		if (!pcm->chan[i] && config && config->chan_names[i])
-			pcm->chan[i] = dma_request_slave_channel(dev,
-				config->chan_names[i]);
+			pcm->chan[i] = dma_request_chan(dev, config->chan_names[i]);
 
 		if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) {
 			pcm->chan[i] = dmaengine_pcm_compat_request_channel(
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