diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2014-05-21 08:52:17 +0530 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-22 00:20:11 +0100 |
commit | c583883ecdca277c258c95dc8c711dfb76d23b40 (patch) | |
tree | d04f2b46fb4dc4878438720fa8d8b62721b46fde /sound/soc/samsung/lowland.c | |
parent | fbfad49076646165bbd72de4dccf1d5132ab7856 (diff) | |
download | lwn-c583883ecdca277c258c95dc8c711dfb76d23b40.tar.gz lwn-c583883ecdca277c258c95dc8c711dfb76d23b40.zip |
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 <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/samsung/lowland.c')
-rw-r--r-- | sound/soc/samsung/lowland.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/sound/soc/samsung/lowland.c b/sound/soc/samsung/lowland.c index 570cf5229508..bd5f0d643a86 100644 --- a/sound/soc/samsung/lowland.c +++ b/sound/soc/samsung/lowland.c @@ -187,23 +187,12 @@ static int lowland_probe(struct platform_device *pdev) card->dev = &pdev->dev; - ret = snd_soc_register_card(card); - if (ret) { + ret = devm_snd_soc_register_card(&pdev->dev, card); + if (ret) dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); - return ret; - } - - return 0; -} - -static int lowland_remove(struct platform_device *pdev) -{ - struct snd_soc_card *card = platform_get_drvdata(pdev); - snd_soc_unregister_card(card); - - return 0; + return ret; } static struct platform_driver lowland_driver = { @@ -213,7 +202,6 @@ static struct platform_driver lowland_driver = { .pm = &snd_soc_pm_ops, }, .probe = lowland_probe, - .remove = lowland_remove, }; module_platform_driver(lowland_driver); |