summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/imx-ssi.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-04-25 11:18:49 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-15 09:27:27 +0400
commit2bf9d4bbd0fa97ff6f214484f62fc8aca64d1d00 (patch)
tree778b12100f6a7497de9ecf4f99cf646e6704fb18 /sound/soc/fsl/imx-ssi.c
parent88e89f5548a6e19bf837633f622764f2d1531748 (diff)
ASoC: fsl: remove use of imx-fiq-pcm-audio from imx-ssi
Rather than instantiating imx-fiq-pcm-audio to call imx_pcm_fiq_init(), imx-ssi can just directly call it to save the use of imx-fiq-pcm-audio. With this change, imx-ssi becomes not only a cpu DAI but also a platform device, so updates platform device setup in eukrea-tlv320, phycore-ac97 and wm1133-ev1 accordingly. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/imx-ssi.c')
-rw-r--r--sound/soc/fsl/imx-ssi.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index b5a2b040816..1b2e750151a 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -595,18 +595,9 @@ static int imx_ssi_probe(struct platform_device *pdev)
goto failed_register;
}
- ssi->soc_platform_pdev_fiq = platform_device_alloc("imx-fiq-pcm-audio", pdev->id);
- if (!ssi->soc_platform_pdev_fiq) {
- ret = -ENOMEM;
- goto failed_pdev_fiq_alloc;
- }
-
- platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi);
- ret = platform_device_add(ssi->soc_platform_pdev_fiq);
- if (ret) {
- dev_err(&pdev->dev, "failed to add platform device\n");
- goto failed_pdev_fiq_add;
- }
+ ret = imx_pcm_fiq_init(pdev);
+ if (ret)
+ goto failed_pcm_fiq;
ret = imx_pcm_dma_init(pdev);
if (ret)
@@ -615,10 +606,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
return 0;
failed_pcm_dma:
- platform_device_del(ssi->soc_platform_pdev_fiq);
-failed_pdev_fiq_add:
- platform_device_put(ssi->soc_platform_pdev_fiq);
-failed_pdev_fiq_alloc:
+ imx_pcm_fiq_exit(pdev);
+failed_pcm_fiq:
snd_soc_unregister_component(&pdev->dev);
failed_register:
release_mem_region(res->start, resource_size(res));
@@ -635,7 +624,7 @@ static int imx_ssi_remove(struct platform_device *pdev)
struct imx_ssi *ssi = platform_get_drvdata(pdev);
imx_pcm_dma_exit(pdev);
- platform_device_unregister(ssi->soc_platform_pdev_fiq);
+ imx_pcm_fiq_exit(pdev);
snd_soc_unregister_component(&pdev->dev);