diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-07-20 04:17:39 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-07-23 21:07:19 +0300 |
commit | 0ceef681e34a61afcd77af0837b2132925c5bad4 (patch) | |
tree | 97c8af1bd0a9a2df249a69fa17cb0ac5eea42ff3 /sound/soc/soc-generic-dmaengine-pcm.c | |
parent | 0c5b270b2e6c92b6a752868a3a1abddc3c52186f (diff) | |
download | linux-0ceef681e34a61afcd77af0837b2132925c5bad4.tar.xz |
ASoC: soc-xxx: add asoc_substream_to_rtd()
Current soc-xxx are getting rtd from substream by
rtd = substream->private_data;
But, getting data from "private_data" is very unclear.
This patch adds asoc_substream_to_rtd() macro which is
easy to understand that rtd from substream.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wo2z0yve.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-generic-dmaengine-pcm.c')
-rw-r--r-- | sound/soc/soc-generic-dmaengine-pcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 61844403f181..d17b4bf1dbe3 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -46,7 +46,7 @@ static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm, int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_dmaengine_dai_dma_data *dma_data; int ret; @@ -105,7 +105,7 @@ static int dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component, struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct dmaengine_pcm *pcm = soc_component_to_pcm(component); struct device *dma_dev = dmaengine_dma_dev(pcm, substream); struct dma_chan *chan = pcm->chan[substream->stream]; |