From: Frank Li <[email protected]>

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 <[email protected]>
---
 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 via email to