Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic...
[linux-2.6-block.git] / sound / soc / tegra / tegra_max98090.c
index 1f20c2c40a5af0e1dbe35bb1fff049b44547616a..902da36581d1ba8af25494b8e69a2fec4415b1eb 100644 (file)
@@ -145,16 +145,14 @@ static const struct snd_kcontrol_new tegra_max98090_controls[] = {
 
 static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd)
 {
-       struct snd_soc_dai *codec_dai = rtd->codec_dai;
-       struct snd_soc_codec *codec = codec_dai->codec;
        struct tegra_max98090 *machine = snd_soc_card_get_drvdata(rtd->card);
 
        if (gpio_is_valid(machine->gpio_hp_det)) {
-               snd_soc_jack_new(codec, "Headphones", SND_JACK_HEADPHONE,
-                               &tegra_max98090_hp_jack);
-               snd_soc_jack_add_pins(&tegra_max98090_hp_jack,
-                               ARRAY_SIZE(tegra_max98090_hp_jack_pins),
-                               tegra_max98090_hp_jack_pins);
+               snd_soc_card_jack_new(rtd->card, "Headphones",
+                                     SND_JACK_HEADPHONE,
+                                     &tegra_max98090_hp_jack,
+                                     tegra_max98090_hp_jack_pins,
+                                     ARRAY_SIZE(tegra_max98090_hp_jack_pins));
 
                tegra_max98090_hp_jack_gpio.gpio = machine->gpio_hp_det;
                snd_soc_jack_add_gpios(&tegra_max98090_hp_jack,
@@ -163,11 +161,11 @@ static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd)
        }
 
        if (gpio_is_valid(machine->gpio_mic_det)) {
-               snd_soc_jack_new(codec, "Mic Jack", SND_JACK_MICROPHONE,
-                                &tegra_max98090_mic_jack);
-               snd_soc_jack_add_pins(&tegra_max98090_mic_jack,
-                                     ARRAY_SIZE(tegra_max98090_mic_jack_pins),
-                                     tegra_max98090_mic_jack_pins);
+               snd_soc_card_jack_new(rtd->card, "Mic Jack",
+                                     SND_JACK_MICROPHONE,
+                                     &tegra_max98090_mic_jack,
+                                     tegra_max98090_mic_jack_pins,
+                                     ARRAY_SIZE(tegra_max98090_mic_jack_pins));
 
                tegra_max98090_mic_jack_gpio.gpio = machine->gpio_mic_det;
                snd_soc_jack_add_gpios(&tegra_max98090_mic_jack,