[malloc] Rename malloc_dma() to malloc_phys()
The malloc_dma() function allocates memory with specified physical alignment, and is typically (though not exclusively) used to allocate memory for DMA. Rename to malloc_phys() to more closely match the functionality, and to create name space for functions that specifically allocate and map DMA-capable buffers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1699,7 +1699,7 @@ void skge_free(struct net_device *dev)
|
||||
free(skge->tx_ring.start);
|
||||
skge->tx_ring.start = NULL;
|
||||
|
||||
free_dma(skge->mem, RING_SIZE);
|
||||
free_phys(skge->mem, RING_SIZE);
|
||||
skge->mem = NULL;
|
||||
skge->dma = 0;
|
||||
}
|
||||
@@ -1714,7 +1714,7 @@ static int skge_up(struct net_device *dev)
|
||||
|
||||
DBG2(PFX "%s: enabling interface\n", dev->name);
|
||||
|
||||
skge->mem = malloc_dma(RING_SIZE, SKGE_RING_ALIGN);
|
||||
skge->mem = malloc_phys(RING_SIZE, SKGE_RING_ALIGN);
|
||||
skge->dma = virt_to_bus(skge->mem);
|
||||
if (!skge->mem)
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user