summaryrefslogtreecommitdiffstats
path: root/sound/soc/amd/raven
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-07-20 10:18:34 +0900
committerMark Brown <broonie@kernel.org>2020-07-23 19:07:30 +0100
commitded0054359ddc1bbd9893ce39af22e1ce7a03357 (patch)
tree840fd0b5f6e0baeb1470044b7fd73e68a146f9ed /sound/soc/amd/raven
parent5c5eb29e8a68ef3ab523fe75179dde5710cae6de (diff)
downloadlinux-ded0054359ddc1bbd9893ce39af22e1ce7a03357.tar.bz2
ASoC: amd: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ft9n0ytv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/raven')
-rw-r--r--sound/soc/amd/raven/acp3x-i2s.c2
-rw-r--r--sound/soc/amd/raven/acp3x-pcm-dma.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index c3eb9b347eaa..5bc028692fcf 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -80,7 +80,7 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
u32 val;
u32 reg_val, frmt_reg;
- prtd = substream->private_data;
+ prtd = asoc_substream_to_rtd(substream);
rtd = substream->runtime->private_data;
card = prtd->card;
adata = snd_soc_dai_get_drvdata(dai);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 17290c829c4b..417cda24030c 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -217,7 +217,7 @@ static int acp3x_dma_open(struct snd_soc_component *component,
int ret;
runtime = substream->runtime;
- prtd = substream->private_data;
+ prtd = asoc_substream_to_rtd(substream);
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
adata = dev_get_drvdata(component->dev);
i2s_data = kzalloc(sizeof(*i2s_data), GFP_KERNEL);
@@ -258,7 +258,7 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct i2s_dev_data *adata;
u64 size;
- prtd = substream->private_data;
+ prtd = asoc_substream_to_rtd(substream);
card = prtd->card;
pinfo = snd_soc_card_get_drvdata(card);
adata = dev_get_drvdata(component->dev);
@@ -340,7 +340,7 @@ static int acp3x_dma_close(struct snd_soc_component *component,
struct i2s_dev_data *adata;
struct i2s_stream_instance *ins;
- prtd = substream->private_data;
+ prtd = asoc_substream_to_rtd(substream);
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
adata = dev_get_drvdata(component->dev);
ins = substream->runtime->private_data;