OSDN Git Service

ASoC: codecs: use asoc_substream_to_rtd()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 20 Jul 2020 01:19:27 +0000 (10:19 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 23 Jul 2020 18:07:38 +0000 (19:07 +0100)
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/871rl70yse.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5677-spi.c

index 95ac12a..8f3993a 100644 (file)
@@ -112,7 +112,7 @@ static int rt5677_spi_pcm_close(
                struct snd_soc_component *component,
                struct snd_pcm_substream *substream)
 {
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct snd_soc_component *codec_component =
                        snd_soc_rtdcom_lookup(rtd, "rt5677");
        struct rt5677_priv *rt5677 =
@@ -158,7 +158,7 @@ static int rt5677_spi_prepare(
                struct snd_soc_component *component,
                struct snd_pcm_substream *substream)
 {
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct snd_soc_component *rt5677_component =
                        snd_soc_rtdcom_lookup(rtd, "rt5677");
        struct rt5677_priv *rt5677 =