summaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/h1940_uda1380.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/samsung/h1940_uda1380.c')
-rw-r--r--sound/soc/samsung/h1940_uda1380.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index 9f2fb69dbaae..720357f11a7f 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -189,6 +189,14 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
+static int h1940_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd)
+{
+ snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
+ hp_jack_gpios);
+
+ return 0;
+}
+
/* s3c24xx digital audio interface glue - connects codec <--> CPU */
static struct snd_soc_dai_link h1940_uda1380_dai[] = {
{
@@ -206,6 +214,7 @@ static struct snd_soc_dai_link h1940_uda1380_dai[] = {
static struct snd_soc_card h1940_asoc = {
.name = "h1940",
.owner = THIS_MODULE,
+ .remove = h1940_uda1380_card_remove,
.dai_link = h1940_uda1380_dai,
.num_links = ARRAY_SIZE(h1940_uda1380_dai),
@@ -257,8 +266,6 @@ err_out:
static void __exit h1940_exit(void)
{
platform_device_unregister(s3c24xx_snd_device);
- snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
- hp_jack_gpios);
gpio_free(S3C_GPIO_END + 9);
}