[PATCH 23/46] dmaengine: sa11x0-dma: use dmaenginem_async_device_register to simplify the code
From: Huang Shijie
Date: Fri Aug 03 2018 - 03:25:19 EST
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.
Signed-off-by: Huang Shijie <sjhuang@xxxxxxxxxxx>
---
drivers/dma/sa11x0-dma.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c
index b31d07c7d93c..9181d6048f43 100644
--- a/drivers/dma/sa11x0-dma.c
+++ b/drivers/dma/sa11x0-dma.c
@@ -863,7 +863,7 @@ static int sa11x0_dma_init_dmadev(struct dma_device *dmadev,
vchan_init(&c->vc, dmadev);
}
- return dma_async_device_register(dmadev);
+ return dmaenginem_async_device_register(dmadev);
}
static int sa11x0_dma_request_irq(struct platform_device *pdev, int nr,
@@ -987,8 +987,6 @@ static int sa11x0_dma_remove(struct platform_device *pdev)
struct sa11x0_dma_dev *d = platform_get_drvdata(pdev);
unsigned pch;
- dma_async_device_unregister(&d->slave);
-
sa11x0_dma_free_channels(&d->slave);
for (pch = 0; pch < NR_PHY_CHAN; pch++)
sa11x0_dma_free_irq(pdev, pch, &d->phy[pch]);
--
2.17.1