diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-01-10 10:43:56 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-11 19:05:14 -0500 |
commit | 25b8d31488a3fb3611651991969526b2ea475764 (patch) | |
tree | de5490848059354f0d4935db1bdeb83bf31e7e31 /sound | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) |
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 <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/Kconfig | 9 | ||||
-rw-r--r-- | sound/soc/fsl/Makefile | 5 | ||||
-rw-r--r-- | sound/soc/fsl/imx-pcm.c | 3 |
3 files changed, 6 insertions, 11 deletions
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index 3b98159d9645..a210c8d7b4bc 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig | |||
@@ -108,18 +108,13 @@ if SND_IMX_SOC | |||
108 | config SND_SOC_IMX_SSI | 108 | config SND_SOC_IMX_SSI |
109 | tristate | 109 | tristate |
110 | 110 | ||
111 | config SND_SOC_IMX_PCM | ||
112 | tristate | ||
113 | |||
114 | config SND_SOC_IMX_PCM_FIQ | 111 | config SND_SOC_IMX_PCM_FIQ |
115 | bool | 112 | tristate |
116 | select FIQ | 113 | select FIQ |
117 | select SND_SOC_IMX_PCM | ||
118 | 114 | ||
119 | config SND_SOC_IMX_PCM_DMA | 115 | config SND_SOC_IMX_PCM_DMA |
120 | bool | 116 | tristate |
121 | select SND_SOC_DMAENGINE_PCM | 117 | select SND_SOC_DMAENGINE_PCM |
122 | select SND_SOC_IMX_PCM | ||
123 | 118 | ||
124 | config SND_SOC_IMX_AUDMUX | 119 | config SND_SOC_IMX_AUDMUX |
125 | tristate | 120 | tristate |
diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile index afd34794db53..ec1457915d7c 100644 --- a/sound/soc/fsl/Makefile +++ b/sound/soc/fsl/Makefile | |||
@@ -41,7 +41,10 @@ endif | |||
41 | obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o | 41 | obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o |
42 | obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o | 42 | obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o |
43 | 43 | ||
44 | obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o | 44 | obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += snd-soc-imx-pcm-fiq.o |
45 | snd-soc-imx-pcm-fiq-y := imx-pcm-fiq.o imx-pcm.o | ||
46 | obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += snd-soc-imx-pcm-dma.o | ||
47 | snd-soc-imx-pcm-dma-y := imx-pcm-dma.o imx-pcm.o | ||
45 | 48 | ||
46 | # i.MX Machine Support | 49 | # i.MX Machine Support |
47 | snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o | 50 | snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o |
diff --git a/sound/soc/fsl/imx-pcm.c b/sound/soc/fsl/imx-pcm.c index d5cd9eff3b48..0c9f188ddc68 100644 --- a/sound/soc/fsl/imx-pcm.c +++ b/sound/soc/fsl/imx-pcm.c | |||
@@ -31,7 +31,6 @@ int snd_imx_pcm_mmap(struct snd_pcm_substream *substream, | |||
31 | runtime->dma_bytes); | 31 | runtime->dma_bytes); |
32 | return ret; | 32 | return ret; |
33 | } | 33 | } |
34 | EXPORT_SYMBOL_GPL(snd_imx_pcm_mmap); | ||
35 | 34 | ||
36 | static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) | 35 | static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) |
37 | { | 36 | { |
@@ -80,7 +79,6 @@ int imx_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
80 | out: | 79 | out: |
81 | return ret; | 80 | return ret; |
82 | } | 81 | } |
83 | EXPORT_SYMBOL_GPL(imx_pcm_new); | ||
84 | 82 | ||
85 | void imx_pcm_free(struct snd_pcm *pcm) | 83 | void imx_pcm_free(struct snd_pcm *pcm) |
86 | { | 84 | { |
@@ -102,7 +100,6 @@ void imx_pcm_free(struct snd_pcm *pcm) | |||
102 | buf->area = NULL; | 100 | buf->area = NULL; |
103 | } | 101 | } |
104 | } | 102 | } |
105 | EXPORT_SYMBOL_GPL(imx_pcm_free); | ||
106 | 103 | ||
107 | MODULE_DESCRIPTION("Freescale i.MX PCM driver"); | 104 | MODULE_DESCRIPTION("Freescale i.MX PCM driver"); |
108 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); | 105 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); |