2 Jun
2015
2 Jun
'15
11:55 a.m.
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
#endifdev_err(&pdev->dev, "Missing SND_EDMA_SOC\n");
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
#endifdev_err(&pdev->dev, "Missing SND_SDMA_SOC\n");
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