aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-i2s.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/davinci/davinci-i2s.c')
-rw-r--r--sound/soc/davinci/davinci-i2s.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index 821831207180..ebe82947bab3 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -645,6 +645,10 @@ static struct snd_soc_dai_driver davinci_i2s_dai = {
645 645
646}; 646};
647 647
648static const struct snd_soc_component_driver davinci_i2s_component = {
649 .name = "davinci-i2s",
650};
651
648static int davinci_i2s_probe(struct platform_device *pdev) 652static int davinci_i2s_probe(struct platform_device *pdev)
649{ 653{
650 struct snd_platform_data *pdata = pdev->dev.platform_data; 654 struct snd_platform_data *pdata = pdev->dev.platform_data;
@@ -727,20 +731,21 @@ static int davinci_i2s_probe(struct platform_device *pdev)
727 731
728 dev_set_drvdata(&pdev->dev, dev); 732 dev_set_drvdata(&pdev->dev, dev);
729 733
730 ret = snd_soc_register_dai(&pdev->dev, &davinci_i2s_dai); 734 ret = snd_soc_register_component(&pdev->dev, &davinci_i2s_component,
735 &davinci_i2s_dai, 1);
731 if (ret != 0) 736 if (ret != 0)
732 goto err_release_clk; 737 goto err_release_clk;
733 738
734 ret = davinci_soc_platform_register(&pdev->dev); 739 ret = davinci_soc_platform_register(&pdev->dev);
735 if (ret) { 740 if (ret) {
736 dev_err(&pdev->dev, "register PCM failed: %d\n", ret); 741 dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
737 goto err_unregister_dai; 742 goto err_unregister_component;
738 } 743 }
739 744
740 return 0; 745 return 0;
741 746
742err_unregister_dai: 747err_unregister_component:
743 snd_soc_unregister_dai(&pdev->dev); 748 snd_soc_unregister_component(&pdev->dev);
744err_release_clk: 749err_release_clk:
745 clk_disable(dev->clk); 750 clk_disable(dev->clk);
746 clk_put(dev->clk); 751 clk_put(dev->clk);
@@ -751,7 +756,7 @@ static int davinci_i2s_remove(struct platform_device *pdev)
751{ 756{
752 struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev); 757 struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev);
753 758
754 snd_soc_unregister_dai(&pdev->dev); 759 snd_soc_unregister_component(&pdev->dev);
755 davinci_soc_platform_unregister(&pdev->dev); 760 davinci_soc_platform_unregister(&pdev->dev);
756 761
757 clk_disable(dev->clk); 762 clk_disable(dev->clk);