ASoC: adau17x1: Replace w->codec with snd_soc_dapm_to_codec(w->dapm)
[firefly-linux-kernel-4.4.55.git] / sound / soc / codecs / adau17x1.c
index 0b659704e60c0db2c425474857a5372e0702a22a..427ad77bfe561acff435ed12a81d9fcc7597638f 100644 (file)
@@ -61,7 +61,8 @@ static const struct snd_kcontrol_new adau17x1_controls[] = {
 static int adau17x1_pll_event(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *kcontrol, int event)
 {
-       struct adau *adau = snd_soc_codec_get_drvdata(w->codec);
+       struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+       struct adau *adau = snd_soc_codec_get_drvdata(codec);
        int ret;
 
        if (SND_SOC_DAPM_EVENT_ON(event)) {
@@ -815,13 +816,6 @@ int adau17x1_add_routes(struct snd_soc_codec *codec)
 }
 EXPORT_SYMBOL_GPL(adau17x1_add_routes);
 
-int adau17x1_suspend(struct snd_soc_codec *codec)
-{
-       codec->driver->set_bias_level(codec, SND_SOC_BIAS_OFF);
-       return 0;
-}
-EXPORT_SYMBOL_GPL(adau17x1_suspend);
-
 int adau17x1_resume(struct snd_soc_codec *codec)
 {
        struct adau *adau = snd_soc_codec_get_drvdata(codec);
@@ -829,7 +823,6 @@ int adau17x1_resume(struct snd_soc_codec *codec)
        if (adau->switch_mode)
                adau->switch_mode(codec->dev);
 
-       codec->driver->set_bias_level(codec, SND_SOC_BIAS_STANDBY);
        regcache_sync(adau->regmap);
 
        return 0;