summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/smartq_wm8987.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/samsung/smartq_wm8987.c')
-rw-r--r--sound/soc/samsung/smartq_wm8987.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index df55db5d3554..271a904277a1 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -182,6 +182,14 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
return err;
}
+static int smartq_wm8987_card_remove(struct snd_soc_pcm_runtime *rtd)
+{
+ snd_soc_jack_free_gpios(&smartq_jack, ARRAY_SIZE(smartq_jack_gpios),
+ smartq_jack_gpios);
+
+ return 0;
+}
+
static struct snd_soc_dai_link smartq_dai[] = {
{
.name = "wm8987",
@@ -198,6 +206,7 @@ static struct snd_soc_dai_link smartq_dai[] = {
static struct snd_soc_card snd_soc_smartq = {
.name = "SmartQ",
.owner = THIS_MODULE,
+ .remove = smartq_wm8987_card_remove,
.dai_link = smartq_dai,
.num_links = ARRAY_SIZE(smartq_dai),
@@ -259,8 +268,6 @@ err_unregister_device:
static void __exit smartq_exit(void)
{
gpio_free(S3C64XX_GPK(12));
- snd_soc_jack_free_gpios(&smartq_jack, ARRAY_SIZE(smartq_jack_gpios),
- smartq_jack_gpios);
platform_device_unregister(smartq_snd_device);
}