summaryrefslogtreecommitdiff
path: root/sound/soc/davinci/davinci-mcasp.c
diff options
context:
space:
mode:
authorHebbar, Gururaja <gururaja.hebbar@ti.com>2012-08-27 18:56:39 +0530
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-27 11:12:08 -0700
commitf08095a408bf6489b4a710d794ae6d5475a007ef (patch)
tree8ca802466c185cee5d9e371501781660903f19e9 /sound/soc/davinci/davinci-mcasp.c
parentc24fdc886fde9ce7bda8115b9c2b338818796c65 (diff)
ASoC: davinci: davinci-pcm does not need to be a plaform_driver
Same as the commit 518de86 (ASoC: tegra: register 'platform' from DAIs, get rid of pdev). It makes davinci-pcm not a platform_driver but helper to register "platform", so that the platform_device for davinci-pcm can be saved completely. Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r--sound/soc/davinci/davinci-mcasp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index d919fb8de7a3..8f3c5a4cf537 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -945,8 +945,17 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
if (ret != 0)
goto err_release_clk;
+
+ ret = davinci_soc_platform_register(&pdev->dev);
+ if (ret) {
+ dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
+ goto err_unregister_dai;
+ }
+
return 0;
+err_unregister_dai:
+ snd_soc_unregister_dai(&pdev->dev);
err_release_clk:
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
@@ -957,6 +966,7 @@ static int davinci_mcasp_remove(struct platform_device *pdev)
{
snd_soc_unregister_dai(&pdev->dev);
+ davinci_soc_platform_unregister(&pdev->dev);
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);