Skip to contentSkip to conversation

ASoC: fix snd_soc_jack_add_gpiods stub

PATCH In review Arnd Bergmann 2 participants 3 messages May 27, 2014

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

PATCH 1/1 ASoC: fix snd_soc_jack_add_gpiods stub

f025d3b9c64e1 ("ASoC: jack: Add support for GPIO descriptor defined jack pins") added this new interface, but the stub function provided for non-gpiolib builds was defined in the header file as a global function, leading to lots of "multiple definition of `snd_soc_jack_add_gpiods'" warnings.

This adds the obvious "static inline" annotation.

include/sound/soc.h +3 -3
index 98dca42..559dc53 100644
@@ -464,9 +464,9 @@ 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;
 }
maintainer
#1 lore raw
Quoted 5 lines · Arnd Bergmann

f025d3b9c64e1 ("ASoC: jack: Add support for GPIO descriptor defined jack pins") added this new interface, but the stub function provided for non-gpiolib builds was defined in the header file as a global function, leading to lots of "multiple definition of `snd_soc_jack_add_gpiods'" warnings.

I've already applied a fix for this from Jarkko.

#2 lore raw
Quoted 8 lines · On Tuesday 27 May 2014 16:50:44 Mark Brown wrote:
Quoted 5 lines · Arnd Bergmann

f025d3b9c64e1 ("ASoC: jack: Add support for GPIO descriptor defined jack pins") added this new interface, but the stub function provided for non-gpiolib builds was defined in the header file as a global function, leading to lots of "multiple definition of `snd_soc_jack_add_gpiods'" warnings.

I've already applied a fix for this from Jarkko.

Ok, cool. I should probably at some point subscribe to alsa-devel so I can check better if someone posted a patch for a bug I find. I did a google search but didn't find anything on this.

Arnd