Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/5200: Fix build error in sound code.

Compiling in the MPC5200 sound drivers results in the following build error:

sound/soc/fsl/mpc5200_psc_ac97.o: In function `to_psc_dma_stream':
mpc5200_psc_ac97.c:(.text+0x0): multiple definition of `to_psc_dma_stream'
sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here
sound/soc/fsl/efika-audio-fabric.o: In function `to_psc_dma_stream':
efika-audio-fabric.c:(.text+0x0): multiple definition of `to_psc_dma_stream'
sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here
make[3]: *** [sound/soc/fsl/built-in.o] Error 1
make[2]: *** [sound/soc/fsl] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

This patch fixes it by declaring the inline function in the header file to
also be a static.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Jon Smirl <jonsmirl@gmail.com>
Tested-by: John Hilmar Linkhorst <John.Linkhorst@rwth-aachen.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

+1 -1
+1 -1
sound/soc/fsl/mpc5200_dma.h
··· 73 73 }; 74 74 75 75 /* Utility for retrieving psc_dma_stream structure from a substream */ 76 - inline struct psc_dma_stream * 76 + static inline struct psc_dma_stream * 77 77 to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma) 78 78 { 79 79 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)