From b80dea9c977181412d525c37b61e74a3ba7ea34b Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Wed, 14 Dec 2016 13:02:24 +0800 Subject: MLK-13608: mfd: mxc-hdmi-core: fix the dependency of alsa sound When remove sound card build config, there will be error drivers/built-in.o: In function `mxc_hdmi_register_audio': vf610_adc.c:(.text+0xd64f8): undefined reference to `_snd_pcm_stream_lock_irqsave' vf610_adc.c:(.text+0xd6518): undefined reference to `snd_pcm_stream_unlock_irqrestore' drivers/built-in.o: In function `mxc_hdmi_abort_stream': vf610_adc.c:(.text+0xd65a4): undefined reference to `_snd_pcm_stream_lock_irqsave' vf610_adc.c:(.text+0xd65d0): undefined reference to `snd_pcm_stream_unlock_irqrestore' make: *** [vmlinux] Error 1 Signed-off-by: Shengjiu Wang --- drivers/mfd/mxc-hdmi-core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/mxc-hdmi-core.c b/drivers/mfd/mxc-hdmi-core.c index a67040661b4a..6435b3d7fd60 100644 --- a/drivers/mfd/mxc-hdmi-core.c +++ b/drivers/mfd/mxc-hdmi-core.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2015 Freescale Semiconductor, Inc. + * Copyright (C) 2011-2016 Freescale Semiconductor, Inc. * The code contained herein is licensed under the GNU General Public * License. You may obtain a copy of the GNU General Public License @@ -100,6 +100,7 @@ unsigned int hdmi_set_blank_state(unsigned int state) } EXPORT_SYMBOL(hdmi_set_blank_state); +#ifdef CONFIG_SND_SOC_IMX_HDMI_DMA static void hdmi_audio_abort_stream(struct snd_pcm_substream *substream) { unsigned long flags; @@ -130,6 +131,13 @@ int mxc_hdmi_abort_stream(void) return 0; } EXPORT_SYMBOL(mxc_hdmi_abort_stream); +#else +int mxc_hdmi_abort_stream(void) +{ + return 0; +} +EXPORT_SYMBOL(mxc_hdmi_abort_stream); +#endif int check_hdmi_state(void) { @@ -148,6 +156,7 @@ int check_hdmi_state(void) } EXPORT_SYMBOL(check_hdmi_state); +#ifdef CONFIG_SND_SOC_IMX_HDMI_DMA int mxc_hdmi_register_audio(struct snd_pcm_substream *substream) { unsigned long flags, flags1; @@ -175,6 +184,7 @@ int mxc_hdmi_register_audio(struct snd_pcm_substream *substream) return ret; } EXPORT_SYMBOL(mxc_hdmi_register_audio); +#endif void mxc_hdmi_unregister_audio(struct snd_pcm_substream *substream) { -- cgit v1.2.3