dmaengine: dw-axi-dmac: use dmaenginem_async_device_register to simplify the code
authorHuang Shijie <sjhuang@iluvatar.ai>
Mon, 6 Aug 2018 08:52:23 +0000 (16:52 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 29 Aug 2018 16:13:17 +0000 (21:43 +0530)
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c

index c4eb55e..b2ac1d2 100644 (file)
@@ -934,7 +934,7 @@ static int dw_probe(struct platform_device *pdev)
 
        pm_runtime_put(chip->dev);
 
-       ret = dma_async_device_register(&dw->dma);
+       ret = dmaenginem_async_device_register(&dw->dma);
        if (ret)
                goto err_pm_disable;
 
@@ -977,8 +977,6 @@ static int dw_remove(struct platform_device *pdev)
                tasklet_kill(&chan->vc.task);
        }
 
-       dma_async_device_unregister(&dw->dma);
-
        return 0;
 }