/* Free a coherent DMA memory and set virtual address of addr to NULL.  */
void i2o_dma_free(struct device *dev, struct i2o_dma *addr)
/* Free a coherent DMA memory and set virtual address of addr to NULL.  */
void i2o_dma_free(struct device *dev, struct i2o_dma *addr)
{
	if (addr->virt) {
		if (addr->phys)
			dma_free_coherent(dev, addr->len, addr->virt,
					  addr->phys);
		else
			kfree(addr->virt);
		addr->virt = NULL;
	}
}