aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/imx-ssi.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-04-24 23:18:49 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:00:41 -0400
commit4fa0a18e6404500b906af596997f093369086e85 (patch)
tree74f880accdd2b474d8060f5d9f03d6ec1f40beae /sound/soc/fsl/imx-ssi.c
parent0f27460e9903677c81dda2cb1b662fb3b4e6564c (diff)
ASoC: fsl: remove use of imx-fiq-pcm-audio from imx-ssi
Commit 2bf9d4bbd0fa97ff6f214484f62fc8aca64d1d00 upstream. 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> Signed-off-by: Shawn Guo <shawn.guo@freescale.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 034dd9b4a1a0..a8362be3cd18 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -590,18 +590,9 @@ static int imx_ssi_probe(struct platform_device *pdev)
590 goto failed_register; 590 goto failed_register;
591 } 591 }
592 592
593 ssi->soc_platform_pdev_fiq = platform_device_alloc("imx-fiq-pcm-audio", pdev->id); 593 ret = imx_pcm_fiq_init(pdev);
594 if (!ssi->soc_platform_pdev_fiq) { 594 if (ret)
595 ret = -ENOMEM; 595 goto failed_pcm_fiq;
596 goto failed_pdev_fiq_alloc;
597 }
598
599 platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi);
600 ret = platform_device_add(ssi->soc_platform_pdev_fiq);
601 if (ret) {
602 dev_err(&pdev->dev, "failed to add platform device\n");
603 goto failed_pdev_fiq_add;
604 }
605 596
606 ret = imx_pcm_dma_init(pdev); 597 ret = imx_pcm_dma_init(pdev);
607 if (ret) 598 if (ret)
@@ -610,10 +601,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
610 return 0; 601 return 0;
611 602
612failed_pcm_dma: 603failed_pcm_dma:
613 platform_device_del(ssi->soc_platform_pdev_fiq); 604 imx_pcm_fiq_exit(pdev);
614failed_pdev_fiq_add: 605failed_pcm_fiq:
615 platform_device_put(ssi->soc_platform_pdev_fiq);
616failed_pdev_fiq_alloc:
617 snd_soc_unregister_component(&pdev->dev); 606 snd_soc_unregister_component(&pdev->dev);
618failed_register: 607failed_register:
619 release_mem_region(res->start, resource_size(res)); 608 release_mem_region(res->start, resource_size(res));
@@ -629,7 +618,7 @@ static int imx_ssi_remove(struct platform_device *pdev)
629 struct imx_ssi *ssi = platform_get_drvdata(pdev); 618 struct imx_ssi *ssi = platform_get_drvdata(pdev);
630 619
631 imx_pcm_dma_exit(pdev); 620 imx_pcm_dma_exit(pdev);
632 platform_device_unregister(ssi->soc_platform_pdev_fiq); 621 imx_pcm_fiq_exit(pdev);
633 622
634 snd_soc_unregister_component(&pdev->dev); 623 snd_soc_unregister_component(&pdev->dev);
635 624