From: Pierre-Louis Bossart Date: Tue, 29 May 2018 23:30:02 +0000 (-0500) Subject: ASoC: fix 0-day warnings with snd_soc_new_compress() X-Git-Tag: v4.18-rc1~127^2^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b014d72ebae14c0c6ab3fb36a442fda91e1a1b3;p=thirdparty%2Flinux.git ASoC: fix 0-day warnings with snd_soc_new_compress() All conditionally-defined routines in include/sound/soc.h expose a static inline fallback to avoid 0-day warnings and compilation issues, except snd_soc_new_compress(). Fixes: 5db6aab6f36f ('ASoC: topology: Add support for compressed PCMs') Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown --- diff --git a/include/sound/soc.h b/include/sound/soc.h index 600a7ebd10c0d..1378dcd2128aa 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -462,6 +462,11 @@ struct snd_soc_component *snd_soc_lookup_component(struct device *dev, int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num); #ifdef CONFIG_SND_SOC_COMPRESS int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num); +#else +static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) +{ + return 0; +} #endif void snd_soc_disconnect_sync(struct device *dev);