Merge remote-tracking branch 'asoc/topic/rt5670' into asoc-next
[deliverable/linux.git] / sound / soc / codecs / wm5100.c
index 96740379b711bf2d5816666772fabf92e85124d9..4c10cd88c1af66a1a54b168c34844c190e077b9d 100644 (file)
@@ -2101,7 +2101,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100)
 int wm5100_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
 {
        struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
-       struct snd_soc_dapm_context *dapm = &codec->dapm;
+       struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
        if (jack) {
                wm5100->jack = jack;
@@ -2336,6 +2336,7 @@ static void wm5100_free_gpio(struct i2c_client *i2c)
 
 static int wm5100_probe(struct snd_soc_codec *codec)
 {
+       struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
        struct i2c_client *i2c = to_i2c_client(codec->dev);
        struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
        int ret, i;
@@ -2353,8 +2354,7 @@ static int wm5100_probe(struct snd_soc_codec *codec)
        /* TODO: check if we're symmetric */
 
        if (i2c->irq)
-               snd_soc_dapm_new_controls(&codec->dapm,
-                                         wm5100_dapm_widgets_noirq,
+               snd_soc_dapm_new_controls(dapm, wm5100_dapm_widgets_noirq,
                                          ARRAY_SIZE(wm5100_dapm_widgets_noirq));
 
        if (wm5100->pdata.hp_pol) {
@@ -2570,11 +2570,13 @@ static int wm5100_i2c_probe(struct i2c_client *i2c,
 
                if (irq_flags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))
                        ret = request_threaded_irq(i2c->irq, NULL,
-                                                  wm5100_edge_irq, irq_flags,
+                                                  wm5100_edge_irq,
+                                                  irq_flags | IRQF_ONESHOT,
                                                   "wm5100", wm5100);
                else
                        ret = request_threaded_irq(i2c->irq, NULL, wm5100_irq,
-                                                  irq_flags, "wm5100",
+                                                  irq_flags | IRQF_ONESHOT,
+                                                  "wm5100",
                                                   wm5100);
 
                if (ret != 0) {
This page took 0.027545 seconds and 5 git commands to generate.