ASoC: don't use rtd->codec on qcom/apq8016_sbc
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 5 Dec 2017 04:24:13 +0000 (04:24 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 5 Dec 2017 12:44:23 +0000 (12:44 +0000)
rtd->codec will be removed soon.
rtd->codec = rtd->codec_dai->codec, thus,
we can use rtd->codec_dai->component instead of it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/apq8016_sbc.c

index 03851fedd1e228257354426425a0287c8f2eaa79..704428735e3c978688505a786e5053b021a8d27b 100644 (file)
@@ -43,7 +43,7 @@ struct apq8016_sbc_data {
 static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       struct snd_soc_codec *codec;
+       struct snd_soc_component *component;
        struct snd_soc_dai_link *dai_link = rtd->dai_link;
        struct snd_soc_card *card = rtd->card;
        struct apq8016_sbc_data *pdata = snd_soc_card_get_drvdata(card);
@@ -102,15 +102,15 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
        for (i = 0 ; i < dai_link->num_codecs; i++) {
                struct snd_soc_dai *dai = rtd->codec_dais[i];
 
-               codec = dai->codec;
+               component = dai->component;
                /* Set default mclk for internal codec */
-               rval = snd_soc_codec_set_sysclk(codec, 0, 0, DEFAULT_MCLK_RATE,
+               rval = snd_soc_component_set_sysclk(component, 0, 0, DEFAULT_MCLK_RATE,
                                       SND_SOC_CLOCK_IN);
                if (rval != 0 && rval != -ENOTSUPP) {
                        dev_warn(card->dev, "Failed to set mclk: %d\n", rval);
                        return rval;
                }
-               rval = snd_soc_codec_set_jack(codec, &pdata->jack, NULL);
+               rval = snd_soc_component_set_jack(component, &pdata->jack, NULL);
                if (rval != 0 && rval != -ENOTSUPP) {
                        dev_warn(card->dev, "Failed to set jack: %d\n", rval);
                        return rval;