Skip to content

Commit ffad75c

Browse files
krzkbroonie
authored andcommitted
ASoC: loongson: 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 fe42c3b commit ffad75c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sound/soc/loongson/loongson_card.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct loongson_card_data {
2323
static int loongson_card_hw_params(struct snd_pcm_substream *substream,
2424
struct snd_pcm_hw_params *params)
2525
{
26-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
26+
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
2727
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
2828
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
2929
struct loongson_card_data *ls_card = snd_soc_card_get_drvdata(rtd->card);

sound/soc/loongson/loongson_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static int loongson_pcm_open(struct snd_soc_component *component,
226226
struct snd_pcm_substream *substream)
227227
{
228228
struct snd_pcm_runtime *runtime = substream->runtime;
229-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
229+
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
230230
struct snd_card *card = substream->pcm->card;
231231
struct loongson_runtime_data *prtd;
232232
struct loongson_dma_data *dma_data;

0 commit comments

Comments
 (0)