linux-sg2042/sound/soc/fsl
Shawn Guo 1927661b17 ASoC: fsl: fix snd-soc-imx-pcm module build
When building modules with CONFIG_SND_IMX_SOC=m in imx_v6_v7_defconfig,
we will see the following link error.

  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

The module snd-soc-imx-pcm is designed to link imx-pcm.o with
imx-pcm-dma.o or imx-pcm-fiq.o depending on if option SND_SOC_IMX_PCM_DMA
or SND_SOC_IMX_PCM_FIQ is enabled.  Both imx-pcm-dma and imx-pcm-fiq
register their own module_platform_driver.  However, these two options
are not mutually exclusive and can be enabled together.  And that's
why we see above multiple init_module definition error.

Instead of having both imx-pcm-dma and imx-pcm-fiq register their
own platform_driver, we should do only once in imx-pcm.c.  Using
platform_device_id to distinguish between imx-pcm-dma and imx-pcm-fiq,
we can run-time call imx-pcm-dma/fiq specific initialization in .probe
hook to have module snd-soc-imx-pcm work for both cases.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-28 14:46:09 +08:00
..
Kconfig Revert "ASoC: fsl: fix multiple definition of init_module" 2013-01-28 14:46:09 +08:00
Makefile Revert "ASoC: fsl: fix multiple definition of init_module" 2013-01-28 14:46:09 +08:00
efika-audio-fabric.c ASoC: fsl: Add .owner to struct snd_soc_card 2011-12-22 17:34:32 +00:00
eukrea-tlv320.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
fsl_dma.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
fsl_dma.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
fsl_ssi.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
fsl_ssi.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
fsl_utils.c ASoC: fsl: remove helper fsl_asoc_get_codec_dev_name 2012-04-01 11:28:27 +01:00
fsl_utils.h ASoC: fsl: remove helper fsl_asoc_get_codec_dev_name 2012-04-01 11:28:27 +01:00
imx-audmux.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
imx-audmux.h ASoC imx-audmux: add MX31_AUDMUX_PORT7_SSI_PINS_7 define 2012-07-18 22:09:40 +01:00
imx-mc13783.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
imx-pcm-dma.c ASoC: fsl: fix snd-soc-imx-pcm module build 2013-01-28 14:46:09 +08:00
imx-pcm-fiq.c ASoC: fsl: fix snd-soc-imx-pcm module build 2013-01-28 14:46:09 +08:00
imx-pcm.c ASoC: fsl: fix snd-soc-imx-pcm module build 2013-01-28 14:46:09 +08:00
imx-pcm.h ASoC: fsl: fix snd-soc-imx-pcm module build 2013-01-28 14:46:09 +08:00
imx-sgtl5000.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
imx-ssi.c Sound updates for 3.8-rc1 2012-12-13 11:51:23 -08:00
imx-ssi.h ARM: imx: move platform_data definitions 2012-09-14 11:17:21 +02:00
mpc5200_dma.c ASoC: fsl: mpc5200 combine psc_dma platform data 2012-09-18 23:03:42 -04:00
mpc5200_dma.h ASoC: fsl: mpc5200 combine psc_dma platform data 2012-09-18 23:03:42 -04:00
mpc5200_psc_ac97.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
mpc5200_psc_ac97.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
mpc5200_psc_i2s.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
mpc8610_hpcd.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
mx27vis-aic32x4.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
p1022_ds.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
p1022_rdk.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
pcm030-audio-fabric.c ASoC: fsl: remove __dev* attributes 2012-12-10 00:30:25 +09:00
phycore-ac97.c ASoC: imx: merge sound/soc/imx into sound/soc/fsl 2012-04-01 11:28:26 +01:00
wm1133-ev1.c ASoC: imx: merge sound/soc/imx into sound/soc/fsl 2012-04-01 11:28:26 +01:00