On 06/02/2015 02:11 PM, Jyri Sarha wrote: >>> - switch (mcasp->version) { >>> + ret = -EINVAL; >> >> Why? What was the problem with setting the ret in the default case? >> > > I would need to have that I three places now for the #else cases, when > devicetree tries to configure pcm driver that has not been compiled. I see now, thanks for pointing out ;) >>> + switch (davinci_mcasp_get_dma_type(mcasp)) { >>> + case MCASP_EDMA: >>> #if IS_BUILTIN(CONFIG_SND_EDMA_SOC) || \ >>> (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \ >>> IS_MODULE(CONFIG_SND_EDMA_SOC)) >>> - case MCASP_VERSION_1: >>> - case MCASP_VERSION_2: >>> - case MCASP_VERSION_3: >>> ret = edma_pcm_platform_register(&pdev->dev); >>> - break; >>> +#else >>> + dev_err(&pdev->dev, "Missing SND_EDMA_SOC\n"); >>> #endif >>> + break; >>> + case MCASP_SDMA: >>> #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; >>> +#else >>> + dev_err(&pdev->dev, "Missing SND_SDMA_SOC\n"); >>> #endif >>> + break; >>> default: >>> - dev_err(&pdev->dev, "Invalid McASP version: %d\n", >>> - mcasp->version); >>> - ret = -EINVAL; >>> + dev_err(&pdev->dev, "No DMA controller found\n"); >>> break; >>> } -- Péter -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html