aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-utils.c')
-rw-r--r--sound/soc/soc-utils.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index 4220bb0f2730..60053709e417 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -89,14 +89,32 @@ static struct snd_soc_platform_driver dummy_platform = {
89 .ops = &dummy_dma_ops, 89 .ops = &dummy_dma_ops,
90}; 90};
91 91
92static struct snd_soc_codec_driver dummy_codec;
93static struct snd_soc_dai_driver dummy_dai = {
94 .name = "snd-soc-dummy-dai",
95};
96
92static __devinit int snd_soc_dummy_probe(struct platform_device *pdev) 97static __devinit int snd_soc_dummy_probe(struct platform_device *pdev)
93{ 98{
94 return snd_soc_register_platform(&pdev->dev, &dummy_platform); 99 int ret;
100
101 ret = snd_soc_register_codec(&pdev->dev, &dummy_codec, &dummy_dai, 1);
102 if (ret < 0)
103 return ret;
104
105 ret = snd_soc_register_platform(&pdev->dev, &dummy_platform);
106 if (ret < 0) {
107 snd_soc_unregister_codec(&pdev->dev);
108 return ret;
109 }
110
111 return ret;
95} 112}
96 113
97static __devexit int snd_soc_dummy_remove(struct platform_device *pdev) 114static __devexit int snd_soc_dummy_remove(struct platform_device *pdev)
98{ 115{
99 snd_soc_unregister_platform(&pdev->dev); 116 snd_soc_unregister_platform(&pdev->dev);
117 snd_soc_unregister_codec(&pdev->dev);
100 118
101 return 0; 119 return 0;
102} 120}