/* @e1000_alloc_ring - allocate memory for a ring structure  */
static int e1000_alloc_ring_dma(struct e1000_adapter *adapter, struct e1000_ring *ring)
/* @e1000_alloc_ring - allocate memory for a ring structure  */
static int e1000_alloc_ring_dma(struct e1000_adapter *adapter, struct e1000_ring *ring)
{
	struct pci_dev *pdev = adapter->pdev;
	ring->desc = dma_alloc_coherent(&pdev->dev, ring->size, &ring->dma,
					GFP_KERNEL);
	if (!ring->desc)
		return -ENOMEM;
	return 0;
}