aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap-twl4030.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/omap-twl4030.c')
-rw-r--r--sound/soc/omap/omap-twl4030.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c
index 64141db311b2..b4e282871658 100644
--- a/sound/soc/omap/omap-twl4030.c
+++ b/sound/soc/omap/omap-twl4030.c
@@ -231,6 +231,19 @@ static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd)
231 return ret; 231 return ret;
232} 232}
233 233
234static int omap_twl4030_card_remove(struct snd_soc_pcm_runtime *rtd)
235{
236 struct snd_soc_card *card = rtd->card;
237 struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
238
239 if (priv->jack_detect > 0)
240 snd_soc_jack_free_gpios(&priv->hs_jack,
241 ARRAY_SIZE(hs_jack_gpios),
242 hs_jack_gpios);
243
244 return 0;
245}
246
234/* Digital audio interface glue - connects codec <--> CPU */ 247/* Digital audio interface glue - connects codec <--> CPU */
235static struct snd_soc_dai_link omap_twl4030_dai_links[] = { 248static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
236 { 249 {
@@ -258,6 +271,7 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
258/* Audio machine driver */ 271/* Audio machine driver */
259static struct snd_soc_card omap_twl4030_card = { 272static struct snd_soc_card omap_twl4030_card = {
260 .owner = THIS_MODULE, 273 .owner = THIS_MODULE,
274 .remove = omap_twl4030_card_remove,
261 .dai_link = omap_twl4030_dai_links, 275 .dai_link = omap_twl4030_dai_links,
262 .num_links = ARRAY_SIZE(omap_twl4030_dai_links), 276 .num_links = ARRAY_SIZE(omap_twl4030_dai_links),
263 277
@@ -353,19 +367,6 @@ static int omap_twl4030_probe(struct platform_device *pdev)
353 return 0; 367 return 0;
354} 368}
355 369
356static int omap_twl4030_remove(struct platform_device *pdev)
357{
358 struct snd_soc_card *card = platform_get_drvdata(pdev);
359 struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
360
361 if (priv->jack_detect > 0)
362 snd_soc_jack_free_gpios(&priv->hs_jack,
363 ARRAY_SIZE(hs_jack_gpios),
364 hs_jack_gpios);
365
366 return 0;
367}
368
369static const struct of_device_id omap_twl4030_of_match[] = { 370static const struct of_device_id omap_twl4030_of_match[] = {
370 {.compatible = "ti,omap-twl4030", }, 371 {.compatible = "ti,omap-twl4030", },
371 { }, 372 { },
@@ -380,7 +381,6 @@ static struct platform_driver omap_twl4030_driver = {
380 .of_match_table = omap_twl4030_of_match, 381 .of_match_table = omap_twl4030_of_match,
381 }, 382 },
382 .probe = omap_twl4030_probe, 383 .probe = omap_twl4030_probe,
383 .remove = omap_twl4030_remove,
384}; 384};
385 385
386module_platform_driver(omap_twl4030_driver); 386module_platform_driver(omap_twl4030_driver);