Skip to contentSkip to conversation

ASoC: jack: Fix multiple definition of `snd_soc_jack_add_gpiods'

PATCH Applied Jarkko Nikula 2 participants 2 messages May 27, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: jack: Fix multiple definition of `snd_soc_jack_add_gpiods'

Commit f025d3b9c64e ("ASoC: jack: Add support for GPIO descriptor defined jack pins") caused build error when CONFIG_GPIOLIB is not set:

sound/include/sound/soc.h:470: multiple definition of `snd_soc_jack_add_gpiods' sound/soc/soc-core.o:sound/include/sound/soc.h:470: first defined here make[2]: *** [sound/soc/snd-soc-core.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Fix this by marking snd_soc_jack_add_gpiods() as static inline in soc.h.

---
 include/sound/soc.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
include/sound/soc.h +4 -3
index 98dca42487bc..15ee2f71b92e 100644
@@ -464,9 +464,10 @@ static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
 	return 0;
 }
 
-int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
-			    struct snd_soc_jack *jack,
-			    int count, struct snd_soc_jack_gpio *gpios)
+static inline int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
+					  struct snd_soc_jack *jack,
+					  int count,
+					  struct snd_soc_jack_gpio *gpios)
 {
 	return 0;
 }
Signature · 1 line
2.0.0.rc2
maintainer Applied
#1 lore raw
Quoted 2 lines · Jarkko Nikula

Commit f025d3b9c64e ("ASoC: jack: Add support for GPIO descriptor defined jack pins") caused build error when CONFIG_GPIOLIB is not set:

Applied, thanks.