[v3,3/3] ASoC: davinci-pcm: Add empty functions for !CONFIG_SND_DAVINCI_SOC builds
diff mbox

Message ID 1395148837-20850-4-git-send-email-peter.ujfalusi@ti.com
State Accepted
Commit 1a95d8d09ef7e40563afd587cce52868e3d076a0
Headers show

Commit Message

Peter Ujfalusi March 18, 2014, 1:20 p.m. UTC
To save drivers using davinci-pcm and edma-pcm the need to fiddle with
!CONFIG_SND_DAVINCI_SOC in their code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/davinci/davinci-pcm.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Mark Brown March 19, 2014, 1:16 p.m. UTC | #1
On Tue, Mar 18, 2014 at 03:20:37PM +0200, Peter Ujfalusi wrote:
> To save drivers using davinci-pcm and edma-pcm the need to fiddle with
> !CONFIG_SND_DAVINCI_SOC in their code.

Applied, thanks.

Patch
diff mbox

diff --git a/sound/soc/davinci/davinci-pcm.h b/sound/soc/davinci/davinci-pcm.h
index fbb710c76c08..5fd4737ab398 100644
--- a/sound/soc/davinci/davinci-pcm.h
+++ b/sound/soc/davinci/davinci-pcm.h
@@ -29,7 +29,17 @@  struct davinci_pcm_dma_params {
 	unsigned int fifo_level;
 };
 
+#if IS_ENABLED(CONFIG_SND_DAVINCI_SOC)
 int davinci_soc_platform_register(struct device *dev);
 void davinci_soc_platform_unregister(struct device *dev);
+#else
+static inline int davinci_soc_platform_register(struct device *dev)
+{
+	return 0;
+}
+static inline void davinci_soc_platform_unregister(struct device *dev)
+{
+}
+#endif /* CONFIG_SND_DAVINCI_SOC */
 
 #endif