Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic...
[muen/linux.git] / sound / soc / codecs / wm8998.c
index 4b64bb46eb21bb426d153e3dc119fc3396e16fbf..2d211dbe742255d5b777924f92c20a867e424f35 100644 (file)
@@ -1284,7 +1284,6 @@ static int wm8998_codec_probe(struct snd_soc_codec *codec)
                return ret;
 
        arizona_init_gpio(codec);
-       arizona_init_notifiers(codec);
 
        snd_soc_component_disable_pin(component, "HAPTICS");
 
@@ -1353,6 +1352,14 @@ static int wm8998_probe(struct platform_device *pdev)
                return -ENOMEM;
        platform_set_drvdata(pdev, wm8998);
 
+       if (IS_ENABLED(CONFIG_OF)) {
+               if (!dev_get_platdata(arizona->dev)) {
+                       ret = arizona_of_get_audio_pdata(arizona);
+                       if (ret < 0)
+                               return ret;
+               }
+       }
+
        wm8998->core.arizona = arizona;
        wm8998->core.num_inputs = 3;    /* IN1L, IN1R, IN2 */
 
@@ -1377,6 +1384,8 @@ static int wm8998_probe(struct platform_device *pdev)
        pm_runtime_enable(&pdev->dev);
        pm_runtime_idle(&pdev->dev);
 
+       arizona_init_common(arizona);
+
        ret = arizona_init_spk_irqs(arizona);
        if (ret < 0)
                return ret;