From: Takashi Iwai Subject: Re: ASoC fixes for v3.13 Date: Thu, 21 Nov 2013 15:55:06 +0100 Message-ID: References: <20131121140456.GS2674@sirena.org.uk> <20131121144931.GB8120@sirena.org.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id B64122625E1 for ; Thu, 21 Nov 2013 15:55:06 +0100 (CET) In-Reply-To: <20131121144931.GB8120@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org, Liam Girdwood List-Id: alsa-devel@alsa-project.org At Thu, 21 Nov 2013 14:49:31 +0000, Mark Brown wrote: > > On Thu, Nov 21, 2013 at 03:41:04PM +0100, Takashi Iwai wrote: > > > +#else > > +static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, > > + struct snd_soc_jack_gpio *gpios) > > +{ > > + return 0; > > +} > > +static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, > > + struct snd_soc_jack_gpio *gpios) > > +{ > > +} > > #endif > > This stubbing seems fine (with a blank between those two). Can you send > a patch please? OK, here it is. Takashi === From: Takashi Iwai Subject: [PATCH] ASoC: Fix build without CONFIG_GPIOLIB snd_soc_jack_gpio stuff is currently enabled for CONFIG_GPIOLIB explicitly with ifdef, and this causes build errors on some drivers such as: sound/soc/omap/rx51.c:220:33: error: array type has incomplete element type Remove ifdef and provide dummy functions for CONFIG_GPIOLIB=n case instead. Signed-off-by: Takashi Iwai --- include/sound/soc.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 1f741cb24f33..f7e1fac51bba 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -334,9 +334,7 @@ struct snd_soc_jack_pin; #include #include -#ifdef CONFIG_GPIOLIB struct snd_soc_jack_gpio; -#endif typedef int (*hw_write_t)(void *,const char* ,int); @@ -446,6 +444,17 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios); void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios); +#else +static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, + struct snd_soc_jack_gpio *gpios) +{ + return 0; +} + +static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, + struct snd_soc_jack_gpio *gpios) +{ +} #endif /* codec register bit access */ @@ -580,7 +589,6 @@ struct snd_soc_jack_zone { * to provide more complex checks (eg, reading an * ADC). */ -#ifdef CONFIG_GPIOLIB struct snd_soc_jack_gpio { unsigned int gpio; const char *name; @@ -594,7 +602,6 @@ struct snd_soc_jack_gpio { int (*jack_status_check)(void); }; -#endif struct snd_soc_jack { struct mutex mutex; -- 1.8.4.3