From f487537c2b6b23332bbea7ecb1fe793b6c74d5b2 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Mon, 14 Jun 2010 00:03:34 -0600 Subject: 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 Cc: Jon Smirl Tested-by: John Hilmar Linkhorst Acked-by: Mark Brown --- sound/soc/fsl/mpc5200_dma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/soc/fsl/mpc5200_dma.h') diff --git a/sound/soc/fsl/mpc5200_dma.h b/sound/soc/fsl/mpc5200_dma.h index 22208b3..e1ec6d9 100644 --- a/sound/soc/fsl/mpc5200_dma.h +++ b/sound/soc/fsl/mpc5200_dma.h @@ -73,7 +73,7 @@ struct psc_dma { }; /* Utility for retrieving psc_dma_stream structure from a substream */ -inline struct psc_dma_stream * +static inline struct psc_dma_stream * to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma) { if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) -- cgit v1.1 From 2dc11581376829303b98eadb2de253bee065a56a Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Fri, 6 Aug 2010 09:25:50 -0600 Subject: of/device: Replace struct of_device with struct platform_device of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely Reviewed-by: David S. Miller --- sound/soc/fsl/mpc5200_dma.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/soc/fsl/mpc5200_dma.h') diff --git a/sound/soc/fsl/mpc5200_dma.h b/sound/soc/fsl/mpc5200_dma.h index e1ec6d9..ca99586 100644 --- a/sound/soc/fsl/mpc5200_dma.h +++ b/sound/soc/fsl/mpc5200_dma.h @@ -81,8 +81,8 @@ to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma) return &psc_dma->playback; } -int mpc5200_audio_dma_create(struct of_device *op); -int mpc5200_audio_dma_destroy(struct of_device *op); +int mpc5200_audio_dma_create(struct platform_device *op); +int mpc5200_audio_dma_destroy(struct platform_device *op); extern struct snd_soc_platform mpc5200_audio_dma_platform; -- cgit v1.1