summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/ams-delta.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/ams-delta.c')
-rw-r--r--sound/soc/omap/ams-delta.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index bb243c663e6b..1f41951d8b7f 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -527,6 +527,15 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
+static int ams_delta_card_remove(struct snd_soc_pcm_runtime *rtd)
+{
+ snd_soc_jack_free_gpios(&ams_delta_hook_switch,
+ ARRAY_SIZE(ams_delta_hook_switch_gpios),
+ ams_delta_hook_switch_gpios);
+
+ return 0;
+}
+
/* DAI glue - connects codec <--> CPU */
static struct snd_soc_dai_link ams_delta_dai_link = {
.name = "CX20442",
@@ -543,6 +552,7 @@ static struct snd_soc_dai_link ams_delta_dai_link = {
static struct snd_soc_card ams_delta_audio_card = {
.name = "AMS_DELTA",
.owner = THIS_MODULE,
+ .remove = ams_delta_card_remove,
.dai_link = &ams_delta_dai_link,
.num_links = 1,
@@ -579,10 +589,6 @@ static int ams_delta_remove(struct platform_device *pdev)
dev_warn(&pdev->dev,
"failed to unregister V253 line discipline\n");
- snd_soc_jack_free_gpios(&ams_delta_hook_switch,
- ARRAY_SIZE(ams_delta_hook_switch_gpios),
- ams_delta_hook_switch_gpios);
-
snd_soc_unregister_card(card);
card->dev = NULL;
return 0;