From: Takashi Iwai Date: Mon, 24 Apr 2017 06:54:41 +0000 (+0200) Subject: ASoC: Provide a dummy wrapper of snd_soc_set_dmi_name() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f5a4535db41bd2bb8d1a15f098cb2921d6c1317;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ASoC: Provide a dummy wrapper of snd_soc_set_dmi_name() For systems without DMI, it makes no sense to have the code. Signed-off-by: Takashi Iwai Acked-by: Liam Girdwood Acked-by: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/include/sound/soc.h b/include/sound/soc.h index cdfb55f7aede..915c06cb2b32 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -497,7 +497,15 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream); int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd, unsigned int dai_fmt); +#ifdef CONFIG_DMI int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour); +#else +static inline int snd_soc_set_dmi_name(struct snd_soc_card *card, + const char *flavour) +{ + return 0; +} +#endif /* Utility functions to get clock rates from various things */ int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6dca408faae3..52f6d9c28df9 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1918,6 +1918,7 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd, EXPORT_SYMBOL_GPL(snd_soc_runtime_set_dai_fmt); +#ifdef CONFIG_DMI /* Trim special characters, and replace '-' with '_' since '-' is used to * separate different DMI fields in the card long name. Only number and * alphabet characters and a few separator characters are kept. @@ -2049,6 +2050,7 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour) return 0; } EXPORT_SYMBOL_GPL(snd_soc_set_dmi_name); +#endif /* CONFIG_DMI */ static int snd_soc_instantiate_card(struct snd_soc_card *card) {