mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank.Li@oss.nxp.com
To: "Martin Povišer" <povik+lin@cutebit.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Shengjiu Wang" <shengjiu.wang@gmail.com>,
	"Xiubo Li" <Xiubo.Lee@gmail.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Nicolin Chen" <nicoleotsuka@gmail.com>,
	"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>, "Sen Wang" <sen@ti.com>
Cc: asahi@lists.linux.dev, linux-sound@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	 linux-renesas-soc@vger.kernel.org, imx@lists.linux.dev,
	vkoul@kernel.org,  Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 1/4] ASoC: apple: mca: Use dmaengine_get_dma_device() instead of chan->device->dev
Date: Fri, 06 Nov 2026 15:13:45 -0500	[thread overview]
Message-ID: <20261106-dma_sound_cleanup-v1-1-5eb8a7b81e87@nxp.com> (raw)
In-Reply-To: <20261106-dma_sound_cleanup-v1-0-5eb8a7b81e87@nxp.com>

From: Frank Li <Frank.Li@nxp.com>

Replace open-coded chan->device->dev with the accessor
dmaengine_get_dma_device() to avoid direct access to DMA engine
internals.

Prepare to make struct dma_device private.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 sound/soc/apple/mca.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c
index 26022a42a95ec..b4ca8ec78488f 100644
--- a/sound/soc/apple/mca.c
+++ b/sound/soc/apple/mca.c
@@ -940,7 +940,7 @@ static int mca_set_runtime_hwparams(struct snd_soc_component *component,
 				    struct snd_pcm_substream *substream,
 				    struct dma_chan *chan)
 {
-	struct device *dma_dev = chan->device->dev;
+	struct device *dma_dev = dmaengine_get_dma_device(chan);
 	struct snd_dmaengine_dai_dma_data dma_data = {};
 	int ret;
 
@@ -1123,7 +1123,7 @@ static int mca_pcm_new(struct snd_soc_component *component,
 
 		cl->dma_chans[i] = chan;
 		snd_pcm_set_managed_buffer(substream, SNDRV_DMA_TYPE_DEV_IRAM,
-					   chan->device->dev, 512 * 1024 * 6,
+					   dmaengine_get_dma_device(chan), 512 * 1024 * 6,
 					   SIZE_MAX);
 	}
 

-- 
2.43.0


  reply	other threads:[~2026-11-06 20:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 20:13 [PATCH 0/4] ASoC: Use dmaengine API " Frank.Li
2026-11-06 20:13 ` Frank.Li [this message]
2026-11-06 20:13 ` [PATCH 2/4] ASoC: fsl: asrc: " Frank.Li
2026-11-06 20:13 ` [PATCH 3/4] ASoC: renesas: rcar: Use dmaengine_get_dma_device() " Frank.Li
2026-11-06 20:13 ` [PATCH 4/4] ASoC: ti: davinci-mcasp: Use dmaengine_get_provider_device() API Frank.Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261106-dma_sound_cleanup-v1-1-5eb8a7b81e87@nxp.com \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=asahi@lists.linux.dev \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=imx@lists.linux.dev \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=magnus.damm@gmail.com \
    --cc=nicoleotsuka@gmail.com \
    --cc=perex@perex.cz \
    --cc=povik+lin@cutebit.org \
    --cc=sen@ti.com \
    --cc=shengjiu.wang@gmail.com \
    --cc=tiwai@suse.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®