]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: davinci-mcasp: Add dependecy to SND_DAVINCI_SOC or SND_OMAP_SOC
authorJyri Sarha <jsarha@ti.com>
Fri, 13 Jun 2014 09:49:59 +0000 (12:49 +0300)
committerMark Brown <broonie@linaro.org>
Sat, 21 Jun 2014 10:03:01 +0000 (11:03 +0100)
Fixes build with SND_DAVINCI_SOC or SND_OMAP_SOC alone and adds build
dependecy to SND_DAVINCI_SOC or SND_OMAP_SOC.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/davinci/Kconfig
sound/soc/davinci/davinci-mcasp.c

index 50a098749b9e2104d8451a16352b855938ae8366..fdbb16fffd303b23c7ff11fefd796b2c92968d11 100644 (file)
@@ -6,6 +6,7 @@ config SND_DAVINCI_SOC_I2S
        tristate
 
 config SND_DAVINCI_SOC_MCASP
+       depends on SND_DAVINCI_SOC || SND_OMAP_SOC
        tristate
 
 config SND_DAVINCI_SOC_VCIF
index 9afb14629a1719ebf407b1028a66d7baf947f4dc..0ee4986038cc690b9c305537d4d8b603c2d2bd13 100644 (file)
@@ -1223,14 +1223,22 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
                goto err;
 
        switch (mcasp->version) {
+#if IS_BUILTIN(CONFIG_SND_DAVINCI_SOC) || \
+       (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \
+        IS_MODULE(CONFIG_SND_DAVINCI_SOC))
        case MCASP_VERSION_1:
        case MCASP_VERSION_2:
        case MCASP_VERSION_3:
                ret = davinci_soc_platform_register(&pdev->dev);
                break;
+#endif
+#if IS_BUILTIN(CONFIG_SND_OMAP_SOC) || \
+       (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \
+        IS_MODULE(CONFIG_SND_OMAP_SOC))
        case MCASP_VERSION_4:
                ret = omap_pcm_platform_register(&pdev->dev);
                break;
+#endif
        default:
                dev_err(&pdev->dev, "Invalid McASP version: %d\n",
                        mcasp->version);