ASoC: fix 0-day warnings with snd_soc_new_compress()
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 29 May 2018 23:30:02 +0000 (18:30 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 30 May 2018 10:35:07 +0000 (11:35 +0100)
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 <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h

index 600a7ebd10c0d76f3e48e4628cd49dce3435fc9e..1378dcd2128aa34f9fdbf9197817760bb98e96df 100644 (file)
@@ -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);