summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/ac97.c
diff options
context:
space:
mode:
authorPadmavathi Venna <padma.v@samsung.com>2012-12-07 13:59:21 +0530
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-07 19:36:07 +0900
commita08485d8fdf6f67ca5f173b68d8f873c574745f2 (patch)
treefac9dbea634fef912a5e74434110ad769b8c963f /sound/soc/samsung/ac97.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/ac97.c')
-rw-r--r--sound/soc/samsung/ac97.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 386bab1f99ab..cd6c7073c50d 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -462,8 +462,15 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev)
if (ret)
goto err5;
- return 0;
+ ret = asoc_dma_platform_register(&pdev->dev);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret);
+ goto err6;
+ }
+ return 0;
+err6:
+ snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(s3c_ac97_dai));
err5:
free_irq(irq_res->start, NULL);
err4:
@@ -482,6 +489,7 @@ static __devexit int s3c_ac97_remove(struct platform_device *pdev)
{
struct resource *mem_res, *irq_res;
+ asoc_dma_platform_unregister(&pdev->dev);
snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(s3c_ac97_dai));
irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);