Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: jack: Fix multiple definition of `snd_soc_jack_add_gpiods'
@ 2014-05-27  7:39 Jarkko Nikula
  2014-05-27 11:05 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Jarkko Nikula @ 2014-05-27  7:39 UTC (permalink / raw)
  To: alsa-devel; +Cc: kbuild test robot, Mark Brown, Jarkko Nikula, Liam Girdwood

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.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 include/sound/soc.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 98dca42487bc..15ee2f71b92e 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -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;
 }
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: jack: Fix multiple definition of `snd_soc_jack_add_gpiods'
  2014-05-27  7:39 [PATCH] ASoC: jack: Fix multiple definition of `snd_soc_jack_add_gpiods' Jarkko Nikula
@ 2014-05-27 11:05 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-05-27 11:05 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: alsa-devel, kbuild test robot, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 222 bytes --]

On Tue, May 27, 2014 at 10:39:57AM +0300, Jarkko Nikula wrote:
> Commit f025d3b9c64e ("ASoC: jack: Add support for GPIO descriptor defined
> jack pins") caused build error when CONFIG_GPIOLIB is not set:

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-27 11:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27  7:39 [PATCH] ASoC: jack: Fix multiple definition of `snd_soc_jack_add_gpiods' Jarkko Nikula
2014-05-27 11:05 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox