From c884ee809940c086a8a11a63f88ce7cd891cb881 Mon Sep 17 00:00:00 2001 From: Deepak Saxena Date: Sun, 1 Feb 2004 19:05:17 -0800 Subject: [PATCH] PCI: Replace pci_pool with generic dma_pool, part 2 include/linux changes: - Add dma_pools member to struct device - Add include/linux/dmapool.h - Remove pools memober from struct pci_dev - Replace pci_pool_* functions with macros that map to dma_pool_* functions --- include/linux/dmapool.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/linux/dmapool.h (limited to 'include/linux/dmapool.h') diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h new file mode 100644 index 000000000000..e60bfdac348d --- /dev/null +++ b/include/linux/dmapool.h @@ -0,0 +1,27 @@ +/* + * include/linux/dmapool.h + * + * Allocation pools for DMAable (coherent) memory. + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef LINUX_DMAPOOL_H +#define LINUX_DMAPOOL_H + +#include +#include + +struct dma_pool *dma_pool_create(const char *name, struct device *dev, + size_t size, size_t align, size_t allocation); + +void dma_pool_destroy(struct dma_pool *pool); + +void *dma_pool_alloc(struct dma_pool *pool, int mem_flags, dma_addr_t *handle); + +void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); + +#endif + -- cgit v1.2.3