diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2017-01-06 21:07:32 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-08 02:48:14 +0100 |
commit | 7f3b490aaacd789ebc0e26e47b7706547afd0438 (patch) | |
tree | 1bbda0e09826038bf7a6d6fff02cefe0a9dc29cf /drivers/net/ethernet/ti | |
parent | net: ethernet: ti: cpdma: minimize number of parameters in cpdma_desc_pool_cr... (diff) | |
download | linux-7f3b490aaacd789ebc0e26e47b7706547afd0438.tar.xz linux-7f3b490aaacd789ebc0e26e47b7706547afd0438.zip |
net: ethernet: ti: cpdma: use devm_ioremap
Use devm_ioremap() and simplify the code.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/davinci_cpdma.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index 7080eb9eceff..b229bf3df912 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -195,8 +195,6 @@ static void cpdma_desc_pool_destroy(struct cpdma_ctlr *ctlr) if (pool->cpumap) dma_free_coherent(ctlr->dev, pool->mem_size, pool->cpumap, pool->phys); - else - iounmap(pool->iomap); } /* @@ -231,7 +229,8 @@ int cpdma_desc_pool_create(struct cpdma_ctlr *ctlr) if (cpdma_params->desc_mem_phys) { pool->phys = cpdma_params->desc_mem_phys; - pool->iomap = ioremap(pool->phys, pool->mem_size); + pool->iomap = devm_ioremap(ctlr->dev, pool->phys, + pool->mem_size); pool->hw_addr = cpdma_params->desc_hw_addr; } else { pool->cpumap = dma_alloc_coherent(ctlr->dev, pool->mem_size, |