diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-08-15 05:31:55 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-08-17 23:48:28 +0300 |
commit | 553de19a0e2f21809bc3864d40308864652521eb (patch) | |
tree | 1da873b776edce4400dba35525a25fd7bda89d88 | |
parent | bc0195aad0daa2ad5b0d76cce22b167bc3435590 (diff) | |
download | linux-553de19a0e2f21809bc3864d40308864652521eb.tar.xz |
ASoC: davinci-vcif: Use devm_snd_soc_register_component
Use resource managed function devm_snd_soc_register_component for
component registration instead of snd_soc_register_component.
Also, remove davinci_vcif_remove as it is now redundant.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/davinci/davinci-vcif.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c index fabd05f24aeb..c77d9218795a 100644 --- a/sound/soc/davinci/davinci-vcif.c +++ b/sound/soc/davinci/davinci-vcif.c @@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, davinci_vcif_dev); - ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component, - &davinci_vcif_dai, 1); + ret = devm_snd_soc_register_component(&pdev->dev, + &davinci_vcif_component, + &davinci_vcif_dai, 1); if (ret != 0) { dev_err(&pdev->dev, "could not register dai\n"); return ret; @@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev) ret = edma_pcm_platform_register(&pdev->dev); if (ret) { dev_err(&pdev->dev, "register PCM failed: %d\n", ret); - snd_soc_unregister_component(&pdev->dev); return ret; } return 0; } -static int davinci_vcif_remove(struct platform_device *pdev) -{ - snd_soc_unregister_component(&pdev->dev); - - return 0; -} - static struct platform_driver davinci_vcif_driver = { .probe = davinci_vcif_probe, - .remove = davinci_vcif_remove, .driver = { .name = "davinci-vcif", }, |