diff options
| -rw-r--r-- | sound/soc/tegra/tegra_max98090.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index af3fb997b752..6760f0ebc133 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c | |||
| @@ -141,16 +141,14 @@ static const struct snd_kcontrol_new tegra_max98090_controls[] = { | |||
| 141 | 141 | ||
| 142 | static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd) | 142 | static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd) |
| 143 | { | 143 | { |
| 144 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
| 145 | struct snd_soc_codec *codec = codec_dai->codec; | ||
| 146 | struct tegra_max98090 *machine = snd_soc_card_get_drvdata(rtd->card); | 144 | struct tegra_max98090 *machine = snd_soc_card_get_drvdata(rtd->card); |
| 147 | 145 | ||
| 148 | if (gpio_is_valid(machine->gpio_hp_det)) { | 146 | if (gpio_is_valid(machine->gpio_hp_det)) { |
| 149 | snd_soc_jack_new(codec, "Headphones", SND_JACK_HEADPHONE, | 147 | snd_soc_card_jack_new(rtd->card, "Headphones", |
| 150 | &tegra_max98090_hp_jack); | 148 | SND_JACK_HEADPHONE, |
| 151 | snd_soc_jack_add_pins(&tegra_max98090_hp_jack, | 149 | &tegra_max98090_hp_jack, |
| 152 | ARRAY_SIZE(tegra_max98090_hp_jack_pins), | 150 | tegra_max98090_hp_jack_pins, |
| 153 | tegra_max98090_hp_jack_pins); | 151 | ARRAY_SIZE(tegra_max98090_hp_jack_pins)); |
| 154 | 152 | ||
| 155 | tegra_max98090_hp_jack_gpio.gpio = machine->gpio_hp_det; | 153 | tegra_max98090_hp_jack_gpio.gpio = machine->gpio_hp_det; |
| 156 | snd_soc_jack_add_gpios(&tegra_max98090_hp_jack, | 154 | snd_soc_jack_add_gpios(&tegra_max98090_hp_jack, |
| @@ -159,11 +157,11 @@ static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd) | |||
| 159 | } | 157 | } |
| 160 | 158 | ||
| 161 | if (gpio_is_valid(machine->gpio_mic_det)) { | 159 | if (gpio_is_valid(machine->gpio_mic_det)) { |
| 162 | snd_soc_jack_new(codec, "Mic Jack", SND_JACK_MICROPHONE, | 160 | snd_soc_card_jack_new(rtd->card, "Mic Jack", |
| 163 | &tegra_max98090_mic_jack); | 161 | SND_JACK_MICROPHONE, |
| 164 | snd_soc_jack_add_pins(&tegra_max98090_mic_jack, | 162 | &tegra_max98090_mic_jack, |
| 165 | ARRAY_SIZE(tegra_max98090_mic_jack_pins), | 163 | tegra_max98090_mic_jack_pins, |
| 166 | tegra_max98090_mic_jack_pins); | 164 | ARRAY_SIZE(tegra_max98090_mic_jack_pins)); |
| 167 | 165 | ||
| 168 | tegra_max98090_mic_jack_gpio.gpio = machine->gpio_mic_det; | 166 | tegra_max98090_mic_jack_gpio.gpio = machine->gpio_mic_det; |
| 169 | snd_soc_jack_add_gpios(&tegra_max98090_mic_jack, | 167 | snd_soc_jack_add_gpios(&tegra_max98090_mic_jack, |
