Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_slave_reg Signed-off-by: Huang Shijie <sjhuang@xxxxxxxxxxx> --- drivers/dma/sh/sudmac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c index 69b9564dc9d9..f861067edef4 100644 --- a/drivers/dma/sh/sudmac.c +++ b/drivers/dma/sh/sudmac.c @@ -376,7 +376,7 @@ static int sudmac_probe(struct platform_device *pdev) goto chan_probe_err; } - err = dma_async_device_register(&su_dev->shdma_dev.dma_dev); + err = dmaenginem_async_device_register(&su_dev->shdma_dev.dma_dev); if (err < 0) goto chan_probe_err; @@ -393,9 +393,7 @@ static int sudmac_probe(struct platform_device *pdev) static int sudmac_remove(struct platform_device *pdev) { struct sudmac_device *su_dev = platform_get_drvdata(pdev); - struct dma_device *dma_dev = &su_dev->shdma_dev.dma_dev; - dma_async_device_unregister(dma_dev); sudmac_chan_remove(su_dev); shdma_cleanup(&su_dev->shdma_dev); -- 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