diff options
Diffstat (limited to 'sound/soc/tegra/tegra_alc5632.c')
-rw-r--r-- | sound/soc/tegra/tegra_alc5632.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c index c61ea3a1030f..02734bd4f09b 100644 --- a/sound/soc/tegra/tegra_alc5632.c +++ b/sound/soc/tegra/tegra_alc5632.c | |||
@@ -125,6 +125,18 @@ static int tegra_alc5632_asoc_init(struct snd_soc_pcm_runtime *rtd) | |||
125 | return 0; | 125 | return 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | static int tegra_alc5632_card_remove(struct snd_soc_card *card) | ||
129 | { | ||
130 | struct tegra_alc5632 *machine = snd_soc_card_get_drvdata(card); | ||
131 | |||
132 | if (gpio_is_valid(machine->gpio_hp_det)) { | ||
133 | snd_soc_jack_free_gpios(&tegra_alc5632_hs_jack, 1, | ||
134 | &tegra_alc5632_hp_jack_gpio); | ||
135 | } | ||
136 | |||
137 | return 0; | ||
138 | } | ||
139 | |||
128 | static struct snd_soc_dai_link tegra_alc5632_dai = { | 140 | static struct snd_soc_dai_link tegra_alc5632_dai = { |
129 | .name = "ALC5632", | 141 | .name = "ALC5632", |
130 | .stream_name = "ALC5632 PCM", | 142 | .stream_name = "ALC5632 PCM", |
@@ -139,6 +151,7 @@ static struct snd_soc_dai_link tegra_alc5632_dai = { | |||
139 | static struct snd_soc_card snd_soc_tegra_alc5632 = { | 151 | static struct snd_soc_card snd_soc_tegra_alc5632 = { |
140 | .name = "tegra-alc5632", | 152 | .name = "tegra-alc5632", |
141 | .owner = THIS_MODULE, | 153 | .owner = THIS_MODULE, |
154 | .remove = tegra_alc5632_card_remove, | ||
142 | .dai_link = &tegra_alc5632_dai, | 155 | .dai_link = &tegra_alc5632_dai, |
143 | .num_links = 1, | 156 | .num_links = 1, |
144 | .controls = tegra_alc5632_controls, | 157 | .controls = tegra_alc5632_controls, |
@@ -223,9 +236,6 @@ static int tegra_alc5632_remove(struct platform_device *pdev) | |||
223 | struct snd_soc_card *card = platform_get_drvdata(pdev); | 236 | struct snd_soc_card *card = platform_get_drvdata(pdev); |
224 | struct tegra_alc5632 *machine = snd_soc_card_get_drvdata(card); | 237 | struct tegra_alc5632 *machine = snd_soc_card_get_drvdata(card); |
225 | 238 | ||
226 | snd_soc_jack_free_gpios(&tegra_alc5632_hs_jack, 1, | ||
227 | &tegra_alc5632_hp_jack_gpio); | ||
228 | |||
229 | snd_soc_unregister_card(card); | 239 | snd_soc_unregister_card(card); |
230 | 240 | ||
231 | tegra_asoc_utils_fini(&machine->util_data); | 241 | tegra_asoc_utils_fini(&machine->util_data); |