Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie <sjhuang@xxxxxxxxxxx> --- drivers/dma/sh/shdmac.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c index 04a74e0a95b7..52060cd21e79 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c @@ -866,7 +866,7 @@ static int sh_dmae_probe(struct platform_device *pdev) pm_runtime_put(&pdev->dev); - err = dma_async_device_register(&shdev->shdma_dev.dma_dev); + err = dmaenginem_async_device_register(&shdev->shdma_dev.dma_dev); if (err < 0) goto edmadevreg; @@ -897,9 +897,6 @@ static int sh_dmae_probe(struct platform_device *pdev) static int sh_dmae_remove(struct platform_device *pdev) { struct sh_dmae_device *shdev = platform_get_drvdata(pdev); - struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev; - - dma_async_device_unregister(dma_dev); spin_lock_irq(&sh_dmae_lock); list_del_rcu(&shdev->node); -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html