Re: multiple definitions of 'to_psc_dma_stream' in kernel-2.6.34

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 12, 2010 at 2:56 PM, Jon Smirl <jonsmirl@xxxxxxxxx> wrote:
> Grant, is this something you did?

Please try the attached fix.

g.

>
> commit 1d8222e8df07ce4f86fb7fa80b02bdee03b57985
> Author: Grant Likely <grant.likely@xxxxxxxxxxxx>
> Date:   Sat Nov 7 01:34:31 2009 -0700
>
>    ASoC/mpc5200: add to_psc_dma_stream() helper
>
>    Move the resolving of the psc_dma_stream pointer to a helper function
>    to reduce duplicate code
>
>    Signed-off-by: Grant Likely <grant.likely@xxxxxxxxxxxx>
>    Acked-by: Liam Girdwood <lrg@xxxxxxxxxxxxxxx>
>    Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
>
>
> On Sat, Jun 12, 2010 at 4:30 PM, John Hilmar Linkhorst
> <John.Linkhorst@xxxxxxxxxxxxxx> wrote:
>> Dear Jon,
>>
>> while compiling the kernel for my efika machine I ran into the following error:
>>
>> LD      sound/soc/fsl/built-in.o
>> 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
>>
>> could you help me solving this problem?
>>
>> best regards
>> John Linkhorst
>>
>
>
>
> --
> Jon Smirl
> jonsmirl@xxxxxxxxx
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
From 15633ad7036dbc56e081420382c0016e55be3319 Mon Sep 17 00:00:00 2001
From: Grant Likely <grant.likely@xxxxxxxxxxxx>
Date: Mon, 14 Jun 2010 00:03:34 -0600
Subject: [PATCH] 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@xxxxxxxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Cc: jonsmirl@xxxxxxxxx
---
 sound/soc/fsl/mpc5200_dma.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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)
-- 
1.7.0.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux