From c583883ecdca277c258c95dc8c711dfb76d23b40 Mon Sep 17 00:00:00 2001 From: Tushar Behera Date: Wed, 21 May 2014 08:52:17 +0530 Subject: ASoC: samsung: Use devm_snd_soc_register_card Replace snd_soc_register_card with devm_snd_soc_register_card. With this change, we can delete the empty remove functions. Signed-off-by: Tushar Behera Signed-off-by: Mark Brown --- sound/soc/samsung/bells.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'sound/soc/samsung/bells.c') diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c index 84f5d8b76679..5b21207cf551 100644 --- a/sound/soc/samsung/bells.c +++ b/sound/soc/samsung/bells.c @@ -433,22 +433,13 @@ static int bells_probe(struct platform_device *pdev) bells_cards[pdev->id].dev = &pdev->dev; - ret = snd_soc_register_card(&bells_cards[pdev->id]); - if (ret) { + ret = devm_snd_soc_register_card(&pdev->dev, &bells_cards[pdev->id]); + if (ret) dev_err(&pdev->dev, "snd_soc_register_card(%s) failed: %d\n", bells_cards[pdev->id].name, ret); - return ret; - } - - return 0; -} - -static int bells_remove(struct platform_device *pdev) -{ - snd_soc_unregister_card(&bells_cards[pdev->id]); - return 0; + return ret; } static struct platform_driver bells_driver = { @@ -458,7 +449,6 @@ static struct platform_driver bells_driver = { .pm = &snd_soc_pm_ops, }, .probe = bells_probe, - .remove = bells_remove, }; module_platform_driver(bells_driver); -- cgit v1.2.2