Commit 553de19a authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Mark Brown

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: default avatarVaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent bc0195aa
...@@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev) ...@@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, davinci_vcif_dev); dev_set_drvdata(&pdev->dev, davinci_vcif_dev);
ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component, ret = devm_snd_soc_register_component(&pdev->dev,
&davinci_vcif_dai, 1); &davinci_vcif_component,
&davinci_vcif_dai, 1);
if (ret != 0) { if (ret != 0) {
dev_err(&pdev->dev, "could not register dai\n"); dev_err(&pdev->dev, "could not register dai\n");
return ret; return ret;
...@@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev) ...@@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev)
ret = edma_pcm_platform_register(&pdev->dev); ret = edma_pcm_platform_register(&pdev->dev);
if (ret) { if (ret) {
dev_err(&pdev->dev, "register PCM failed: %d\n", ret); dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
snd_soc_unregister_component(&pdev->dev);
return ret; return ret;
} }
return 0; 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 = { static struct platform_driver davinci_vcif_driver = {
.probe = davinci_vcif_probe, .probe = davinci_vcif_probe,
.remove = davinci_vcif_remove,
.driver = { .driver = {
.name = "davinci-vcif", .name = "davinci-vcif",
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment