diff options
Diffstat (limited to 'sound/soc/tegra/tegra_wm8903.c')
-rw-r--r-- | sound/soc/tegra/tegra_wm8903.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index 4ac73730d79a..0939661df60b 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c | |||
@@ -206,6 +206,12 @@ static int tegra_wm8903_remove(struct snd_soc_card *card) | |||
206 | struct snd_soc_pcm_runtime *rtd = &(card->rtd[0]); | 206 | struct snd_soc_pcm_runtime *rtd = &(card->rtd[0]); |
207 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 207 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
208 | struct snd_soc_codec *codec = codec_dai->codec; | 208 | struct snd_soc_codec *codec = codec_dai->codec; |
209 | struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); | ||
210 | |||
211 | if (gpio_is_valid(machine->gpio_hp_det)) { | ||
212 | snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack, 1, | ||
213 | &tegra_wm8903_hp_jack_gpio); | ||
214 | } | ||
209 | 215 | ||
210 | wm8903_mic_detect(codec, NULL, 0, 0); | 216 | wm8903_mic_detect(codec, NULL, 0, 0); |
211 | 217 | ||
@@ -228,9 +234,7 @@ static struct snd_soc_card snd_soc_tegra_wm8903 = { | |||
228 | .owner = THIS_MODULE, | 234 | .owner = THIS_MODULE, |
229 | .dai_link = &tegra_wm8903_dai, | 235 | .dai_link = &tegra_wm8903_dai, |
230 | .num_links = 1, | 236 | .num_links = 1, |
231 | |||
232 | .remove = tegra_wm8903_remove, | 237 | .remove = tegra_wm8903_remove, |
233 | |||
234 | .controls = tegra_wm8903_controls, | 238 | .controls = tegra_wm8903_controls, |
235 | .num_controls = ARRAY_SIZE(tegra_wm8903_controls), | 239 | .num_controls = ARRAY_SIZE(tegra_wm8903_controls), |
236 | .dapm_widgets = tegra_wm8903_dapm_widgets, | 240 | .dapm_widgets = tegra_wm8903_dapm_widgets, |
@@ -368,9 +372,6 @@ static int tegra_wm8903_driver_remove(struct platform_device *pdev) | |||
368 | struct snd_soc_card *card = platform_get_drvdata(pdev); | 372 | struct snd_soc_card *card = platform_get_drvdata(pdev); |
369 | struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); | 373 | struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); |
370 | 374 | ||
371 | snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack, 1, | ||
372 | &tegra_wm8903_hp_jack_gpio); | ||
373 | |||
374 | snd_soc_unregister_card(card); | 375 | snd_soc_unregister_card(card); |
375 | 376 | ||
376 | tegra_asoc_utils_fini(&machine->util_data); | 377 | tegra_asoc_utils_fini(&machine->util_data); |