From 25b8d31488a3fb3611651991969526b2ea475764 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Thu, 10 Jan 2013 23:43:56 +0800 Subject: ASoC: fsl: fix multiple definition of init_module With commit f2818d0 (ASoC: fsl: fix miscompilation of snd-soc-imx-pcm), we will see the following build error when building modules with CONFIG_SND_IMX_SOC=m in imx_v6_v7_defconfig. CC [M] sound/soc/fsl/phycore-ac97.o LD [M] sound/soc/fsl/snd-soc-fsl-ssi.o LD [M] sound/soc/fsl/snd-soc-fsl-utils.o LD [M] sound/soc/fsl/snd-soc-imx-ssi.o LD [M] sound/soc/fsl/snd-soc-imx-audmux.o LD [M] sound/soc/fsl/snd-soc-imx-pcm.o sound/soc/fsl/imx-pcm-dma.o: In function `init_module': imx-pcm-dma.c:(.init.text+0x0): multiple definition of `init_module' sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.init.text+0x0): first defined here sound/soc/fsl/imx-pcm-dma.o: In function `cleanup_module': imx-pcm-dma.c:(.exit.text+0x0): multiple definition of `cleanup_module' sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.exit.text+0x0): first defined here make[4]: *** [sound/soc/fsl/snd-soc-imx-pcm.o] Error 1 Instead of using bool for SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA to fix the original issue, we should completely remove SND_SOC_IMX_PCM and have imx-pcm.o statically linked with imx-pcm-fiq.o or imx-pcm-dma.o. Signed-off-by: Shawn Guo Signed-off-by: Mark Brown --- sound/soc/fsl/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sound/soc/fsl/Makefile') diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile index afd34794db5..ec1457915d7 100644 --- a/sound/soc/fsl/Makefile +++ b/sound/soc/fsl/Makefile @@ -41,7 +41,10 @@ endif obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o -obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o +obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += snd-soc-imx-pcm-fiq.o +snd-soc-imx-pcm-fiq-y := imx-pcm-fiq.o imx-pcm.o +obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += snd-soc-imx-pcm-dma.o +snd-soc-imx-pcm-dma-y := imx-pcm-dma.o imx-pcm.o # i.MX Machine Support snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o -- cgit v1.2.3