Skip to content

Commit 3b62178

Browse files
krzkbroonie
authored andcommitted
ASoC: img: 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-7-6f8a8902b479@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent b695d8b commit 3b62178

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

sound/soc/img/img-i2s-in.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ static int img_i2s_in_dma_prepare_slave_config(struct snd_pcm_substream *st,
395395
struct snd_pcm_hw_params *params, struct dma_slave_config *sc)
396396
{
397397
unsigned int i2s_channels = params_channels(params) / 2;
398-
struct snd_soc_pcm_runtime *rtd = st->private_data;
398+
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(st);
399399
struct snd_dmaengine_dai_dma_data *dma_data;
400400
int ret;
401401

sound/soc/img/img-i2s-out.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static int img_i2s_out_dma_prepare_slave_config(struct snd_pcm_substream *st,
401401
struct snd_pcm_hw_params *params, struct dma_slave_config *sc)
402402
{
403403
unsigned int i2s_channels = params_channels(params) / 2;
404-
struct snd_soc_pcm_runtime *rtd = st->private_data;
404+
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(st);
405405
struct snd_dmaengine_dai_dma_data *dma_data;
406406
int ret;
407407

0 commit comments

Comments
 (0)