diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-11-21 15:55:06 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-25 17:12:15 +0000 |
commit | 8778ac6be25abf0496fc614a3e77ad2ff8300353 (patch) | |
tree | 57e9515e4a74e3105be919993a5ba573b47b8ea3 /include/sound | |
parent | 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff) | |
download | linux-8778ac6be25abf0496fc614a3e77ad2ff8300353.tar.gz linux-8778ac6be25abf0496fc614a3e77ad2ff8300353.tar.bz2 linux-8778ac6be25abf0496fc614a3e77ad2ff8300353.zip |
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 <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc.h | 15 |
1 files 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 <sound/soc-dapm.h> #include <sound/soc-dpcm.h> -#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; |