[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:
@@ -292,7 +292,7 @@ static int rhine_create_ring ( struct rhine_nic *rhn,
|
||||
unsigned int i;
|
||||
|
||||
/* Allocate descriptors */
|
||||
ring->desc = malloc_dma ( len, RHINE_RING_ALIGN );
|
||||
ring->desc = malloc_phys ( len, RHINE_RING_ALIGN );
|
||||
if ( ! ring->desc )
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -328,7 +328,7 @@ static void rhine_destroy_ring ( struct rhine_nic *rhn,
|
||||
writel ( 0, rhn->regs + ring->reg );
|
||||
|
||||
/* Free descriptor ring */
|
||||
free_dma ( ring->desc, len );
|
||||
free_phys ( ring->desc, len );
|
||||
ring->desc = NULL;
|
||||
ring->prod = 0;
|
||||
ring->cons = 0;
|
||||
|
||||
Reference in New Issue
Block a user