[PATCH v2 4/7] ASoC: pxa: Replace dma_request_slave_channel() by dma_request_chan()
From: Andy Shevchenko
Date: Fri Sep 18 2026 - 08:41:38 EST
Replace dma_request_slave_channel() by dma_request_chan() as suggested
since the former is deprecated.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
sound/soc/pxa/pxa2xx-pcm-lib.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/soc/pxa/pxa2xx-pcm-lib.c b/sound/soc/pxa/pxa2xx-pcm-lib.c
index 88a9d3226302..4b5b07f0c444 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,11 @@ 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);
+ if (IS_ERR(chan))
+ return -ENXIO;
+
+ return snd_dmaengine_pcm_open(substream, chan);
}
static int pxa2xx_pcm_close(struct snd_pcm_substream *substream)
--
2.50.1