[alsa-devel] [PATCH 1/4] ASoC: atmel_pcm: make it buildable as module

Bo Shen voice.shen at atmel.com
Thu Jan 31 04:53:37 CET 2013

When build as module, it reports following error, using this patch
fix it

sound/soc/atmel/atmel-pcm-pdc.c:387: error: redefinition of 'atmel_pcm_pdc_platform_register'
sound/soc/atmel/atmel-pcm.h:95: note: previous definition of 'atmel_pcm_pdc_platform_register' was here
sound/soc/atmel/atmel-pcm-pdc.c:393: error: redefinition of 'atmel_pcm_pdc_platform_unregister'
sound/soc/atmel/atmel-pcm.h:99: note: previous definition of 'atmel_pcm_pdc_platform_unregister' was here

Signed-off-by: Bo Shen <voice.shen at atmel.com>
 sound/soc/atmel/atmel-pcm.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/atmel/atmel-pcm.h b/sound/soc/atmel/atmel-pcm.h
index bb45d20..12ae814 100644
--- a/sound/soc/atmel/atmel-pcm.h
+++ b/sound/soc/atmel/atmel-pcm.h
@@ -88,7 +88,8 @@ void atmel_pcm_free(struct snd_pcm *pcm);
 int atmel_pcm_mmap(struct snd_pcm_substream *substream,
 		struct vm_area_struct *vma);
+#if defined(CONFIG_SND_ATMEL_SOC_PDC) || \
 int atmel_pcm_pdc_platform_register(struct device *dev);
 void atmel_pcm_pdc_platform_unregister(struct device *dev);
@@ -101,7 +102,8 @@ static inline void atmel_pcm_pdc_platform_unregister(struct device *dev)
+#if defined(CONFIG_SND_ATMEL_SOC_DMA) || \
 int atmel_pcm_dma_platform_register(struct device *dev);
 void atmel_pcm_dma_platform_unregister(struct device *dev);

More information about the Alsa-devel mailing list