ASoC: mfld_machine: Register jacks at the card level
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 4 Mar 2015 09:33:24 +0000 (10:33 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 4 Mar 2015 17:10:16 +0000 (17:10 +0000)
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/mfld_machine.c

index d22b44db824ee88c16d90350ebbeaf87931f3986..49c09a0add797ff95101bee1923b62254e3928a0 100644 (file)
@@ -255,20 +255,15 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
        snd_soc_dapm_disable_pin(dapm, "LINEINR");
 
        /* Headset and button jack detection */
-       ret_val = snd_soc_jack_new(runtime->codec, "Intel(R) MID Audio Jack",
-                       SND_JACK_HEADSET | SND_JACK_BTN_0 |
-                       SND_JACK_BTN_1, &mfld_jack);
+       ret_val = snd_soc_card_jack_new(runtime->card,
+                       "Intel(R) MID Audio Jack", SND_JACK_HEADSET |
+                       SND_JACK_BTN_0 | SND_JACK_BTN_1, &mfld_jack,
+                       mfld_jack_pins, ARRAY_SIZE(mfld_jack_pins));
        if (ret_val) {
                pr_err("jack creation failed\n");
                return ret_val;
        }
 
-       ret_val = snd_soc_jack_add_pins(&mfld_jack,
-                       ARRAY_SIZE(mfld_jack_pins), mfld_jack_pins);
-       if (ret_val) {
-               pr_err("adding jack pins failed\n");
-               return ret_val;
-       }
        ret_val = snd_soc_jack_add_zones(&mfld_jack,
                        ARRAY_SIZE(mfld_zones), mfld_zones);
        if (ret_val) {