aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-03-21 06:32:15 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-26 17:55:27 -0400
commitc22fd5ef0fcccc8e960f307893fc5b3de68512d7 (patch)
tree56c937fb918db317a2d7aeba2de46bb5b0a62360
parent3580aa10fbb3a0ffbca9853dc827ea84f1073748 (diff)
ASoC: switch over to use snd_soc_register_component() on imx ssi
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/fsl/imx-ssi.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 55464a5b0706..90110ada270d 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -413,6 +413,10 @@ static struct snd_soc_dai_driver imx_ac97_dai = {
413 .ops = &imx_ssi_pcm_dai_ops, 413 .ops = &imx_ssi_pcm_dai_ops,
414}; 414};
415 415
416static const struct snd_soc_component_driver imx_component = {
417 .name = DRV_NAME,
418};
419
416static void setup_channel_to_ac97(struct imx_ssi *imx_ssi) 420static void setup_channel_to_ac97(struct imx_ssi *imx_ssi)
417{ 421{
418 void __iomem *base = imx_ssi->base; 422 void __iomem *base = imx_ssi->base;
@@ -586,7 +590,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
586 590
587 platform_set_drvdata(pdev, ssi); 591 platform_set_drvdata(pdev, ssi);
588 592
589 ret = snd_soc_register_dai(&pdev->dev, dai); 593 ret = snd_soc_register_component(&pdev->dev, &imx_component,
594 dai, 1);
590 if (ret) { 595 if (ret) {
591 dev_err(&pdev->dev, "register DAI failed\n"); 596 dev_err(&pdev->dev, "register DAI failed\n");
592 goto failed_register; 597 goto failed_register;
@@ -627,7 +632,7 @@ failed_pdev_alloc:
627failed_pdev_fiq_add: 632failed_pdev_fiq_add:
628 platform_device_put(ssi->soc_platform_pdev_fiq); 633 platform_device_put(ssi->soc_platform_pdev_fiq);
629failed_pdev_fiq_alloc: 634failed_pdev_fiq_alloc:
630 snd_soc_unregister_dai(&pdev->dev); 635 snd_soc_unregister_component(&pdev->dev);
631failed_register: 636failed_register:
632 release_mem_region(res->start, resource_size(res)); 637 release_mem_region(res->start, resource_size(res));
633failed_get_resource: 638failed_get_resource:
@@ -645,7 +650,7 @@ static int imx_ssi_remove(struct platform_device *pdev)
645 platform_device_unregister(ssi->soc_platform_pdev); 650 platform_device_unregister(ssi->soc_platform_pdev);
646 platform_device_unregister(ssi->soc_platform_pdev_fiq); 651 platform_device_unregister(ssi->soc_platform_pdev_fiq);
647 652
648 snd_soc_unregister_dai(&pdev->dev); 653 snd_soc_unregister_component(&pdev->dev);
649 654
650 if (ssi->flags & IMX_SSI_USE_AC97) 655 if (ssi->flags & IMX_SSI_USE_AC97)
651 ac97_ssi = NULL; 656 ac97_ssi = NULL;