ASoC: omap: Replace instances of rtd->codec->card with rtd->card
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 19 May 2014 09:41:46 +0000 (11:41 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 20 May 2014 21:54:54 +0000 (22:54 +0100)
No need to go via the CODEC to get a pointer to the card. This will help to
eventually remove the card field from the snd_soc_codec struct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/omap/omap-abe-twl6040.c
sound/soc/omap/omap-twl4030.c
sound/soc/omap/rx51.c

index 1a89e5b1be163bc07e35cc6d8ea274c437f18e11..cec836ed0c01e9aa169e02bb8888ecdb94618939 100644 (file)
@@ -47,8 +47,7 @@ static int omap_abe_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
-       struct snd_soc_codec *codec = rtd->codec;
-       struct snd_soc_card *card = codec->card;
+       struct snd_soc_card *card = rtd->card;
        struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card);
        int clk_id, freq;
        int ret;
@@ -168,7 +167,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
 static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_codec *codec = rtd->codec;
-       struct snd_soc_card *card = codec->card;
+       struct snd_soc_card *card = rtd->card;
        struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card);
        int hs_trim;
        int ret = 0;
index 0c83e206e957423ee640309b7eeaace31113bc03..64141db311b2ade4e74bd9822cde40d6a98414d0 100644 (file)
@@ -55,8 +55,7 @@ static int omap_twl4030_hw_params(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       struct snd_soc_codec *codec = rtd->codec;
-       struct snd_soc_card *card = codec->card;
+       struct snd_soc_card *card = rtd->card;
        unsigned int fmt;
        int ret;
 
@@ -179,7 +178,7 @@ static inline void twl4030_disconnect_pin(struct snd_soc_dapm_context *dapm,
 static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_codec *codec = rtd->codec;
-       struct snd_soc_card *card = codec->card;
+       struct snd_soc_card *card = rtd->card;
        struct snd_soc_dapm_context *dapm = &codec->dapm;
        struct omap_tw4030_pdata *pdata = dev_get_platdata(card->dev);
        struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
index 866578bcda5580a42f02f764a568eb840fe6b3f0..6951dc812055c630db442228f6aa95b917a4c3f3 100644 (file)
@@ -286,7 +286,7 @@ static const struct snd_kcontrol_new aic34_rx51_controls[] = {
 static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_codec *codec = rtd->codec;
-       struct snd_soc_card *card = codec->card;
+       struct snd_soc_card *card = rtd->card;
        struct rx51_audio_pdata *pdata = snd_soc_card_get_drvdata(card);
 
        struct snd_soc_dapm_context *dapm = &codec->dapm;