diff options
Diffstat (limited to 'sound/soc/fsl/imx-ssi.c')
-rw-r--r-- | sound/soc/fsl/imx-ssi.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index f58bcd85c07f..57d6941676ff 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c | |||
@@ -600,19 +600,17 @@ static int imx_ssi_probe(struct platform_device *pdev) | |||
600 | ssi->fiq_params.dma_params_rx = &ssi->dma_params_rx; | 600 | ssi->fiq_params.dma_params_rx = &ssi->dma_params_rx; |
601 | ssi->fiq_params.dma_params_tx = &ssi->dma_params_tx; | 601 | ssi->fiq_params.dma_params_tx = &ssi->dma_params_tx; |
602 | 602 | ||
603 | ret = imx_pcm_fiq_init(pdev, &ssi->fiq_params); | 603 | ssi->fiq_init = imx_pcm_fiq_init(pdev, &ssi->fiq_params); |
604 | if (ret) | 604 | ssi->dma_init = imx_pcm_dma_init(pdev); |
605 | goto failed_pcm_fiq; | ||
606 | 605 | ||
607 | ret = imx_pcm_dma_init(pdev); | 606 | if (ssi->fiq_init && ssi->dma_init) { |
608 | if (ret) | 607 | ret = ssi->fiq_init; |
609 | goto failed_pcm_dma; | 608 | goto failed_pcm; |
609 | } | ||
610 | 610 | ||
611 | return 0; | 611 | return 0; |
612 | 612 | ||
613 | failed_pcm_dma: | 613 | failed_pcm: |
614 | imx_pcm_fiq_exit(pdev); | ||
615 | failed_pcm_fiq: | ||
616 | snd_soc_unregister_component(&pdev->dev); | 614 | snd_soc_unregister_component(&pdev->dev); |
617 | failed_register: | 615 | failed_register: |
618 | release_mem_region(res->start, resource_size(res)); | 616 | release_mem_region(res->start, resource_size(res)); |
@@ -628,8 +626,11 @@ static int imx_ssi_remove(struct platform_device *pdev) | |||
628 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 626 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
629 | struct imx_ssi *ssi = platform_get_drvdata(pdev); | 627 | struct imx_ssi *ssi = platform_get_drvdata(pdev); |
630 | 628 | ||
631 | imx_pcm_dma_exit(pdev); | 629 | if (!ssi->dma_init) |
632 | imx_pcm_fiq_exit(pdev); | 630 | imx_pcm_dma_exit(pdev); |
631 | |||
632 | if (!ssi->fiq_init) | ||
633 | imx_pcm_fiq_exit(pdev); | ||
633 | 634 | ||
634 | snd_soc_unregister_component(&pdev->dev); | 635 | snd_soc_unregister_component(&pdev->dev); |
635 | 636 | ||