[PATCH 2/2] ASoC: sprd: replace direct ->device_prep*() calls with standard DMA engine API

From: Frank . Li

Date: Thu Sep 17 2026 - 19:54:27 EST


From: Frank Li <Frank.Li@xxxxxxx>

DMA engine consumers must not call the channel's device_prep_*() function
pointers directly. Use the standard dmaengine wrapper APIs instead.

Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
---
sound/soc/sprd/sprd-pcm-compress.c | 6 +++---
sound/soc/sprd/sprd-pcm-dma.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sprd/sprd-pcm-compress.c b/sound/soc/sprd/sprd-pcm-compress.c
index e5249924b54d9..649e59462935d 100644
--- a/sound/soc/sprd/sprd-pcm-compress.c
+++ b/sound/soc/sprd/sprd-pcm-compress.c
@@ -235,9 +235,9 @@ static int sprd_platform_compr_dma_config(struct snd_soc_component *component,
* We configure the DMA request mode, interrupt mode, channel
* mode and channel trigger mode by the flags.
*/
- dma->desc = dma->chan->device->device_prep_slave_sg(dma->chan, sg,
- sg_num, dir,
- flags, &link);
+ dma->desc = dmaengine_prep_slave_sg_context(dma->chan, sg,
+ sg_num, dir,
+ flags, &link);
if (!dma->desc) {
dev_err(dev, "failed to prepare slave sg\n");
ret = -ENOMEM;
diff --git a/sound/soc/sprd/sprd-pcm-dma.c b/sound/soc/sprd/sprd-pcm-dma.c
index 2d5ffbe17e814..d31afbebfbd0e 100644
--- a/sound/soc/sprd/sprd-pcm-dma.c
+++ b/sound/soc/sprd/sprd-pcm-dma.c
@@ -276,9 +276,9 @@ static int sprd_pcm_hw_params(struct snd_soc_component *component,
*/
flags = SPRD_DMA_FLAGS(SPRD_DMA_CHN_MODE_NONE, SPRD_DMA_NO_TRG,
SPRD_DMA_FRAG_REQ, SPRD_DMA_TRANS_INT);
- data->desc = chan->device->device_prep_slave_sg(chan, sg,
- sg_num, dir,
- flags, &link);
+ data->desc = dmaengine_prep_slave_sg_context(chan, sg,
+ sg_num, dir,
+ flags, &link);
if (!data->desc) {
dev_err(component->dev, "failed to prepare slave sg\n");
ret = -ENOMEM;

--
2.43.0