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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b695d8b commit 3b62178

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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)