Skip to contentSkip to conversation

multiple definitions of 'to_psc_dma_stream' in kernel-2.6.34

DISCUSSION Grant Likely 2 participants 3 messages Jun 14, 2010 – Jun 15, 2010 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive
Quoted 1 line · Jon Smirl

Grant, is this something you did?

Please try the attached fix.

g.

Quoted 45 lines

commit 1d8222e8df07ce4f86fb7fa80b02bdee03b57985
Author: Grant Likely <[email protected]>
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

Quoted 16 lines · John Hilmar Linkhorst

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

Quoted 5 lines

could you help me solving this problem?

best regards
John Linkhorst

--
Jon Smirl
[email protected]

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

From 15633ad7036dbc56e081420382c0016e55be3319 Mon Sep 17 00:00:00 2001
From: Grant Likely <[email protected]>
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.

---
 sound/soc/fsl/mpc5200_dma.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/mpc5200_dma.h +1 -1
index 22208b3..e1ec6d9 100644
@@ -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)
Signature · 1 line
1.7.0.4

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#3 lore raw
Quoted 4 lines · Grant Likely
Quoted 1 line · Jon Smirl

Grant, is this something you did?

Please try the attached fix.

Mark, I just got an okay on this one from John Linkhorst. It's such a trivial fix that I'm just going to merge it via my tree.

g.

Quoted 55 lines

g.

Quoted 41 lines

commit 1d8222e8df07ce4f86fb7fa80b02bdee03b57985
Author: Grant Likely <[email protected]>
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

Quoted 16 lines · John Hilmar Linkhorst

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

Quoted 5 lines

could you help me solving this problem?

best regards
John Linkhorst

Quoted 4 lines

--
Jon Smirl
[email protected]

--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Acked-by
#4 lore raw
Quoted 2 lines · Grant Likely

Mark, I just got an okay on this one from John Linkhorst. It's such a trivial fix that I'm just going to merge it via my tree.

Sure, go ahead.