* [PATCH] ASoC: davinci-evm: drop un-necessary remove function
@ 2015-03-26 13:38 Jyri Sarha
2015-03-26 17:02 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jyri Sarha @ 2015-03-26 13:38 UTC (permalink / raw)
To: alsa-devel, linux-omap
Cc: peter.ujfalusi, broonie, liam.r.girdwood, Manish Badarkhe,
Jyri Sarha
From: Manish Badarkhe <manishvb@ti.com>
As davinci card gets registered using 'devm_' api
there is no need to unregister the card in 'remove'
function.
Hence drop the 'remove' function.
Signed-off-by: Manish Badarkhe <manishvb@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
sound/soc/davinci/davinci-evm.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index b6bb594..8c2b9be 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -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,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: davinci-evm: drop un-necessary remove function
2015-03-26 13:38 [PATCH] ASoC: davinci-evm: drop un-necessary remove function Jyri Sarha
@ 2015-03-26 17:02 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2015-03-26 17:02 UTC (permalink / raw)
To: Jyri Sarha
Cc: alsa-devel, linux-omap, peter.ujfalusi, liam.r.girdwood,
Manish Badarkhe
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
On Thu, Mar 26, 2015 at 03:38:25PM +0200, Jyri Sarha wrote:
> From: Manish Badarkhe <manishvb@ti.com>
>
> 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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-26 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 13:38 [PATCH] ASoC: davinci-evm: drop un-necessary remove function Jyri Sarha
2015-03-26 17:02 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox