From 90817edda898382fcc83ceb01ee1f7aacce0ca19 Mon Sep 17 00:00:00 2001 From: Robby Cai Date: Fri, 2 Nov 2012 15:58:40 +0800 Subject: [PATCH] ENGR00232000: Fix "dmaengine: failed to get dma1chan0: (-22)" when boot The log from [MX6DL/S_SD]: ... mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver ldb dmaengine: failed to get dma1chan0: (-22) dmaengine: failed to get dma1chan1: (-22) dmaengine: failed to get dma1chan2: (-22) dmaengine: failed to get dma1chan3: (-22) dmaengine: failed to get dma1chan4: (-22) dmaengine: failed to get dma1chan5: (-22) dmaengine: failed to get dma1chan6: (-22) dmaengine: failed to get dma1chan7: (-22) dmaengine: failed to get dma1chan8: (-22) dmaengine: failed to get dma1chan9: (-22) dmaengine: failed to get dma1chan10: (-22) dmaengine: failed to get dma1chan11: (-22) dmaengine: failed to get dma1chan12: (-22) dmaengine: failed to get dma1chan13: (-22) dmaengine: failed to get dma1chan14: (-22) dmaengine: failed to get dma1chan15: (-22) ... It happens when there are many DMA-engine drivers in the system and dmaengine_get() is called. dmaengine_get() will call dma_chan_get(), which will call device_alloc_chan_resources() literally on channels of available dma drivers unless reach -ENODEV. device_alloc_chan_resources() is implemented in the individual dma drivers, which could return -EINVAL rather than -ENODEV, then the above messages print out (doesn't hurt, however). Indeed, the dmaengine_get() and dmaengine_put() is not needed and thus removed. Signed-off-by: Robby Cai --- drivers/dma/pxp/pxp_device.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/dma/pxp/pxp_device.c b/drivers/dma/pxp/pxp_device.c index 6b3d7aa37dce..5981fa6331a9 100644 --- a/drivers/dma/pxp/pxp_device.c +++ b/drivers/dma/pxp/pxp_device.c @@ -477,9 +477,6 @@ static int __devinit pxp_device_probe(struct platform_device *pdev) { int ret; - /* PxP DMA interface */ - dmaengine_get(); - ret = misc_register(&pxp_device_miscdev); if (ret) return ret; @@ -492,8 +489,6 @@ static int __devexit pxp_device_remove(struct platform_device *pdev) { misc_deregister(&pxp_device_miscdev); - dmaengine_put(); - return 0; } -- 2.39.5