ASoC: fsl: create function imx_pcm_fiq_exit()
authorShawn Guo <shawn.guo@linaro.org>
Thu, 25 Apr 2013 03:18:48 +0000 (11:18 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 15 May 2013 05:27:27 +0000 (09:27 +0400)
Create function imx_pcm_fiq_exit() to be paired with imx_pcm_fiq_init()
just like the pair of imx_pcm_dma_init() and imx_pcm_dma_exit().

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/fsl/imx-pcm-fiq.c
sound/soc/fsl/imx-pcm.c
sound/soc/fsl/imx-pcm.h

index 670b96b..710c069 100644 (file)
@@ -314,3 +314,8 @@ failed_register:
 
        return ret;
 }
+
+void imx_pcm_fiq_exit(struct platform_device *pdev)
+{
+       snd_soc_unregister_platform(&pdev->dev);
+}
index c498964..16a956b 100644 (file)
@@ -115,7 +115,7 @@ static int imx_pcm_probe(struct platform_device *pdev)
 static int imx_pcm_remove(struct platform_device *pdev)
 {
        if (strcmp(pdev->id_entry->name, "imx-fiq-pcm-audio") == 0)
-               snd_soc_unregister_platform(&pdev->dev);
+               imx_pcm_fiq_exit(pdev);
        else
                imx_pcm_dma_exit(pdev);
 
index b7fa0d7..073bf38 100644 (file)
@@ -53,11 +53,16 @@ static inline void imx_pcm_dma_exit(struct platform_device *pdev)
 
 #ifdef CONFIG_SND_SOC_IMX_PCM_FIQ
 int imx_pcm_fiq_init(struct platform_device *pdev);
+void imx_pcm_fiq_exit(struct platform_device *pdev);
 #else
 static inline int imx_pcm_fiq_init(struct platform_device *pdev)
 {
        return -ENODEV;
 }
+
+static inline void imx_pcm_fiq_exit(struct platform_device *pdev)
+{
+}
 #endif
 
 #endif /* _IMX_PCM_H */