aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/s3c2412-i2s.c
diff options
context:
space:
mode:
authorPadmavathi Venna <padma.v@samsung.com>2012-12-07 03:29:21 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-07 05:36:07 -0500
commita08485d8fdf6f67ca5f173b68d8f873c574745f2 (patch)
treefac9dbea634fef912a5e74434110ad769b8c963f /sound/soc/samsung/s3c2412-i2s.c
parent1974a042dd15f1f007a3a1a2dd7a23ca0e42c01d (diff)
ASoC: Samsung: Do not register samsung audio dma device as pdev
Previously, the ASoC 'platform' (PCM/DMA) object was instantiated via a platform_device. This didn't represent the hardware well, since there was no separate hardware associated with this platform_device; it was a virtual device with sole purpose to call snd_soc_register_platform(). This change removes the platform_device completely. Each Samsung DAI now registers the ASoC 'platform' itself. Machine drivers are adjusted for the new 'platform' name. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/samsung/s3c2412-i2s.c')
-rw-r--r--sound/soc/samsung/s3c2412-i2s.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index ac7701b3c5dc..edf5f527c5a2 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -162,11 +162,29 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
162 162
163static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev) 163static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev)
164{ 164{
165 return s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai); 165 int ret = 0;
166
167 ret = s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai);
168 if (ret) {
169 pr_err("failed to register the dai\n");
170 return ret;
171 }
172
173 ret = asoc_dma_platform_register(&pdev->dev);
174 if (ret) {
175 pr_err("failed to register the DMA: %d\n", ret);
176 goto err;
177 }
178
179 return 0;
180err:
181 snd_soc_unregister_dai(&pdev->dev);
182 return ret;
166} 183}
167 184
168static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev) 185static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev)
169{ 186{
187 asoc_dma_platform_unregister(&pdev->dev);
170 snd_soc_unregister_dai(&pdev->dev); 188 snd_soc_unregister_dai(&pdev->dev);
171 return 0; 189 return 0;
172} 190}