diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-06-03 11:51:14 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-06-03 11:51:14 +0200 |
commit | 8743dcd6639c28204ac03fb3e9db7932e3d85418 (patch) | |
tree | 53b80846cf6731ddb196d522ed2bbf0f76da8344 /sound/soc/tegra/tegra_wm8903.c | |
parent | Merge branch 'for-linus' into for-next (diff) | |
parent | ASoC: free jack GPIOs before the sound card is freed (diff) | |
download | linux-dev-8743dcd6639c28204ac03fb3e9db7932e3d85418.tar.xz linux-dev-8743dcd6639c28204ac03fb3e9db7932e3d85418.zip |
Merge tag 'asoc-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Final updates for v3.16
A few more updates from the last week of development, nothing too
exciting. Highlights include:
- GPIO descriptor support for jacks
- More updates and fixes to the Freescale SSI, Intel and rsnd drivers.
- New drivers for Analog Devices ADAU1361, ADAU1381, ADAU1761 and
ADAU1781, and Realtek RT5677.
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) struct snd_soc_pcm_runtime *rtd = &(card->rtd[0]); struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_codec *codec = codec_dai->codec; + struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); + + if (gpio_is_valid(machine->gpio_hp_det)) { + snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack, 1, + &tegra_wm8903_hp_jack_gpio); + } wm8903_mic_detect(codec, NULL, 0, 0); @@ -228,9 +234,7 @@ static struct snd_soc_card snd_soc_tegra_wm8903 = { .owner = THIS_MODULE, .dai_link = &tegra_wm8903_dai, .num_links = 1, - .remove = tegra_wm8903_remove, - .controls = tegra_wm8903_controls, .num_controls = ARRAY_SIZE(tegra_wm8903_controls), .dapm_widgets = tegra_wm8903_dapm_widgets, @@ -368,9 +372,6 @@ static int tegra_wm8903_driver_remove(struct platform_device *pdev) struct snd_soc_card *card = platform_get_drvdata(pdev); struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); - snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack, 1, - &tegra_wm8903_hp_jack_gpio); - snd_soc_unregister_card(card); tegra_asoc_utils_fini(&machine->util_data); |