diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-06-03 13:51:14 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-06-03 13:51:14 +0400 |
commit | 8743dcd6639c28204ac03fb3e9db7932e3d85418 (patch) | |
tree | 53b80846cf6731ddb196d522ed2bbf0f76da8344 /sound/soc/tegra/tegra_rt5640.c | |
parent | efd4b76ef789541e7046e873b3546209352cdb59 (diff) | |
parent | e1d4d3c854f25cff6c6c139588570e124d5e8fa4 (diff) | |
download | linux-8743dcd6639c28204ac03fb3e9db7932e3d85418.tar.xz |
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_rt5640.c')
-rw-r--r-- | sound/soc/tegra/tegra_rt5640.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c index 4511c5a875ec..4feb16a99e02 100644 --- a/sound/soc/tegra/tegra_rt5640.c +++ b/sound/soc/tegra/tegra_rt5640.c @@ -128,6 +128,18 @@ static int tegra_rt5640_asoc_init(struct snd_soc_pcm_runtime *rtd) return 0; } +static int tegra_rt5640_card_remove(struct snd_soc_card *card) +{ + struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card); + + if (gpio_is_valid(machine->gpio_hp_det)) { + snd_soc_jack_free_gpios(&tegra_rt5640_hp_jack, 1, + &tegra_rt5640_hp_jack_gpio); + } + + return 0; +} + static struct snd_soc_dai_link tegra_rt5640_dai = { .name = "RT5640", .stream_name = "RT5640 PCM", @@ -141,6 +153,7 @@ static struct snd_soc_dai_link tegra_rt5640_dai = { static struct snd_soc_card snd_soc_tegra_rt5640 = { .name = "tegra-rt5640", .owner = THIS_MODULE, + .remove = tegra_rt5640_card_remove, .dai_link = &tegra_rt5640_dai, .num_links = 1, .controls = tegra_rt5640_controls, @@ -224,9 +237,6 @@ static int tegra_rt5640_remove(struct platform_device *pdev) struct snd_soc_card *card = platform_get_drvdata(pdev); struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card); - snd_soc_jack_free_gpios(&tegra_rt5640_hp_jack, 1, - &tegra_rt5640_hp_jack_gpio); - snd_soc_unregister_card(card); tegra_asoc_utils_fini(&machine->util_data); |