Replace dma_request_slave_channel() by dma_request_chan() as suggested
since the former is deprecated.

Signed-off-by: Andy Shevchenko <[email protected]>
---
 sound/soc/soc-generic-dmaengine-pcm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-generic-dmaengine-pcm.c 
b/sound/soc/soc-generic-dmaengine-pcm.c
index 65b7ec52a054..6d1dbee8f6c1 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -242,9 +242,11 @@ static int dmaengine_pcm_new(struct snd_soc_component 
*component,
                if (!substream)
                        continue;
 
-               if (!pcm->chan[i] && config->chan_names[i])
-                       pcm->chan[i] = dma_request_slave_channel(dev,
-                               config->chan_names[i]);
+               if (!pcm->chan[i] && config->chan_names[i]) {
+                       pcm->chan[i] = dma_request_chan(dev, 
config->chan_names[i]);
+                       if (IS_ERR(pcm->chan[i]))
+                               pcm->chan[i] = NULL;
+               }
 
                if (!pcm->chan[i] && (pcm->flags & 
SND_DMAENGINE_PCM_FLAG_COMPAT)) {
                        pcm->chan[i] = dmaengine_pcm_compat_request_channel(
-- 
2.50.1


Reply via email to