Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie <sjhuang@xxxxxxxxxxx> --- drivers/dma/at_hdmac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 75f38d19fcbe..536146601238 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1954,7 +1954,7 @@ static int __init at_dma_probe(struct platform_device *pdev) dma_has_cap(DMA_SLAVE, atdma->dma_common.cap_mask) ? "slave " : "", plat_dat->nr_channels); - dma_async_device_register(&atdma->dma_common); + dmaenginem_async_device_register(&atdma->dma_common); /* * Do not return an error if the dmac node is not present in order to @@ -1973,7 +1973,6 @@ static int __init at_dma_probe(struct platform_device *pdev) return 0; err_of_dma_controller_register: - dma_async_device_unregister(&atdma->dma_common); dma_pool_destroy(atdma->memset_pool); err_memset_pool_create: dma_pool_destroy(atdma->dma_desc_pool); @@ -2000,7 +1999,6 @@ static int at_dma_remove(struct platform_device *pdev) struct resource *io; at_dma_off(atdma); - dma_async_device_unregister(&atdma->dma_common); dma_pool_destroy(atdma->memset_pool); dma_pool_destroy(atdma->dma_desc_pool); -- 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