From a08485d8fdf6f67ca5f173b68d8f873c574745f2 Mon Sep 17 00:00:00 2001 From: Padmavathi Venna Date: Fri, 7 Dec 2012 13:59:21 +0530 Subject: 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 Signed-off-by: Mark Brown --- sound/soc/samsung/s3c2412-i2s.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'sound/soc/samsung/s3c2412-i2s.c') diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index ac7701b3c5d..edf5f527c5a 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 = { static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev) { - return s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai); + int ret = 0; + + ret = s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai); + if (ret) { + pr_err("failed to register the dai\n"); + return ret; + } + + ret = asoc_dma_platform_register(&pdev->dev); + if (ret) { + pr_err("failed to register the DMA: %d\n", ret); + goto err; + } + + return 0; +err: + snd_soc_unregister_dai(&pdev->dev); + return ret; } static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev) { + asoc_dma_platform_unregister(&pdev->dev); snd_soc_unregister_dai(&pdev->dev); return 0; } -- cgit v1.2.3-70-g09d2