lkml.org 
[lkml]   [2018]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 10/46] dmaengine: tegra210-adma: use helper dmaenginem_async_device_register
Date
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister
remove the label dma_remove

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
drivers/dma/tegra210-adma.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
index b26256f23d67..bd99f12a00e3 100644
--- a/drivers/dma/tegra210-adma.c
+++ b/drivers/dma/tegra210-adma.c
@@ -746,7 +746,7 @@ static int tegra_adma_probe(struct platform_device *pdev)
tdma->dma_dev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;

- ret = dma_async_device_register(&tdma->dma_dev);
+ ret = dmaenginem_async_device_register(&tdma->dma_dev);
if (ret < 0) {
dev_err(&pdev->dev, "ADMA registration failed: %d\n", ret);
goto irq_dispose;
@@ -756,7 +756,7 @@ static int tegra_adma_probe(struct platform_device *pdev)
tegra_dma_of_xlate, tdma);
if (ret < 0) {
dev_err(&pdev->dev, "ADMA OF registration failed %d\n", ret);
- goto dma_remove;
+ goto irq_dispose;
}

pm_runtime_put(&pdev->dev);
@@ -766,8 +766,6 @@ static int tegra_adma_probe(struct platform_device *pdev)

return 0;

-dma_remove:
- dma_async_device_unregister(&tdma->dma_dev);
irq_dispose:
while (--i >= 0)
irq_dispose_mapping(tdma->channels[i].irq);
@@ -786,8 +784,6 @@ static int tegra_adma_remove(struct platform_device *pdev)
struct tegra_adma *tdma = platform_get_drvdata(pdev);
int i;

- dma_async_device_unregister(&tdma->dma_dev);
-
for (i = 0; i < tdma->nr_channels; ++i)
irq_dispose_mapping(tdma->channels[i].irq);

--
2.17.1
\
 
 \ /
  Last update: 2018-08-03 09:26    [W:0.168 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site