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/pxa/pxa2xx-pcm-lib.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-pcm-lib.c b/sound/soc/pxa/pxa2xx-pcm-lib.c
index 88a9d3226302..0ccf88aa1138 100644
--- a/sound/soc/pxa/pxa2xx-pcm-lib.c
+++ b/sound/soc/pxa/pxa2xx-pcm-lib.c
@@ -79,6 +79,7 @@ static int pxa2xx_pcm_open(struct snd_pcm_substream 
*substream)
        struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct snd_dmaengine_dai_dma_data *dma_params;
+       struct dma_chan *chan;
        int ret;
 
        runtime->hw = pxa2xx_pcm_hardware;
@@ -107,9 +108,12 @@ static int pxa2xx_pcm_open(struct snd_pcm_substream 
*substream)
        if (ret < 0)
                return ret;
 
-       return snd_dmaengine_pcm_open(
-               substream, dma_request_slave_channel(snd_soc_rtd_to_cpu(rtd, 
0)->dev,
-                                                    dma_params->chan_name));
+       chan = dma_request_chan(snd_soc_rtd_to_cpu(rtd, 0)->dev, 
dma_params->chan_name);
+       ret = PTR_ERR_OR_ZERO(chan);
+       if (ret)
+               return ret;
+
+       return snd_dmaengine_pcm_open(substream, chan);
 }
 
 static int pxa2xx_pcm_close(struct snd_pcm_substream *substream)
-- 
2.50.1


Reply via email to