Skip to contentSkip to conversation

ASoC: davinci-evm: drop un-necessary remove function

PATCH In review Jyri Sarha 2 participants 2 messages Mar 26, 2015

Subsystems (2)
lore
Share & tools
lore

Jyri Sarha

author
#0 lore raw

PATCH 1/1 ASoC: davinci-evm: drop un-necessary remove function

From: Manish Badarkhe <[email protected]>

As davinci card gets registered using 'devm_' api there is no need to unregister the card in 'remove' function.
Hence drop the 'remove' function.

---
 sound/soc/davinci/davinci-evm.c | 10 ----------
 1 file changed, 10 deletions(-)
sound/soc/davinci/davinci-evm.c +0 -10
index b6bb594..8c2b9be 100644
@@ -425,18 +425,8 @@ static int davinci_evm_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int davinci_evm_remove(struct platform_device *pdev)
-{
-	struct snd_soc_card *card = platform_get_drvdata(pdev);
-
-	snd_soc_unregister_card(card);
-
-	return 0;
-}
-
 static struct platform_driver davinci_evm_driver = {
 	.probe		= davinci_evm_probe,
-	.remove		= davinci_evm_remove,
 	.driver		= {
 		.name	= "davinci_evm",
 		.pm	= &snd_soc_pm_ops,
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 6 lines · Jyri Sarha

From: Manish Badarkhe <[email protected]>

As davinci card gets registered using 'devm_' api there is no need to unregister the card in 'remove' function.
Hence drop the 'remove' function.

Not only that but the current remove function creates a double free. Applied, thanks.