Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f3b490a authored by Grygorii Strashko's avatar Grygorii Strashko Committed by David S. Miller
Browse files

net: ethernet: ti: cpdma: use devm_ioremap



Use devm_ioremap() and simplify the code.

Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5fcc40a9
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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,