Commit 3f1a91aa authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown

ASoC: fsl: Fix module build

Building imx_v6_v7_defconfig with all audio drivers as modules results in
the folowing build error:

ERROR: "imx_pcm_fiq_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_fiq_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined!
ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined!

Fix this by allowing SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA to be also
built as modules and by using 'IS_ENABLED' to cover the module case.
Reported-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 32bd8cd2
...@@ -109,11 +109,11 @@ config SND_SOC_IMX_SSI ...@@ -109,11 +109,11 @@ config SND_SOC_IMX_SSI
tristate tristate
config SND_SOC_IMX_PCM_FIQ config SND_SOC_IMX_PCM_FIQ
bool tristate
select FIQ select FIQ
config SND_SOC_IMX_PCM_DMA config SND_SOC_IMX_PCM_DMA
bool tristate
select SND_SOC_GENERIC_DMAENGINE_PCM select SND_SOC_GENERIC_DMAENGINE_PCM
config SND_SOC_IMX_AUDMUX config SND_SOC_IMX_AUDMUX
......
...@@ -38,7 +38,7 @@ struct imx_pcm_fiq_params { ...@@ -38,7 +38,7 @@ struct imx_pcm_fiq_params {
struct snd_dmaengine_dai_dma_data *dma_params_tx; struct snd_dmaengine_dai_dma_data *dma_params_tx;
}; };
#ifdef CONFIG_SND_SOC_IMX_PCM_DMA #if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA)
int imx_pcm_dma_init(struct platform_device *pdev); int imx_pcm_dma_init(struct platform_device *pdev);
void imx_pcm_dma_exit(struct platform_device *pdev); void imx_pcm_dma_exit(struct platform_device *pdev);
#else #else
...@@ -52,7 +52,7 @@ static inline void imx_pcm_dma_exit(struct platform_device *pdev) ...@@ -52,7 +52,7 @@ static inline void imx_pcm_dma_exit(struct platform_device *pdev)
} }
#endif #endif
#ifdef CONFIG_SND_SOC_IMX_PCM_FIQ #if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_FIQ)
int imx_pcm_fiq_init(struct platform_device *pdev, int imx_pcm_fiq_init(struct platform_device *pdev,
struct imx_pcm_fiq_params *params); struct imx_pcm_fiq_params *params);
void imx_pcm_fiq_exit(struct platform_device *pdev); void imx_pcm_fiq_exit(struct platform_device *pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment