Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: arm: Use snd_soc_substream_to_rtd() for accessing private_data

Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-4-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
a80f2f84 72a666f4

+2 -2
+2 -2
sound/arm/pxa2xx-pcm-lib.c
··· 33 33 struct snd_pcm_hw_params *params) 34 34 { 35 35 struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); 36 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 36 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 37 37 struct snd_dmaengine_dai_dma_data *dma_params; 38 38 struct dma_slave_config config; 39 39 int ret; ··· 79 79 80 80 int pxa2xx_pcm_open(struct snd_pcm_substream *substream) 81 81 { 82 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 82 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 83 83 struct snd_pcm_runtime *runtime = substream->runtime; 84 84 struct snd_dmaengine_dai_dma_data *dma_params; 85 85 int ret;