ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codec
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 29 Sep 2014 09:40:41 +0000 (11:40 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 29 Sep 2014 17:25:43 +0000 (18:25 +0100)
The CODEC struct in the snd_soc_dapm_context struct is deprecated and
scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.

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

index 943922c79f784b1ad70f4f71628c71e6ebb87812..b10ae8074461e9403d6f276943c82cbf5c3531ce 100644 (file)
@@ -168,7 +168,7 @@ static int rx51_spk_event(struct snd_soc_dapm_widget *w,
 static int rx51_hp_event(struct snd_soc_dapm_widget *w,
                         struct snd_kcontrol *k, int event)
 {
-       struct snd_soc_codec *codec = w->dapm->codec;
+       struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
        if (SND_SOC_DAPM_EVENT_ON(event))
                tpa6130a2_stereo_enable(codec, 1);