[PATCH 41/46] dmaengine: at_hdmac: use dmaenginem_async_device_register to simplify the code
From: Huang Shijie
Date: Fri Aug 03 2018 - 03:21:59 EST
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