summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/dmapool.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/linux/dmapool.h')
-rw-r--r--kernel/include/linux/dmapool.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/include/linux/dmapool.h b/kernel/include/linux/dmapool.h
index 52456aa56..53ba73750 100644
--- a/kernel/include/linux/dmapool.h
+++ b/kernel/include/linux/dmapool.h
@@ -11,8 +11,8 @@
#ifndef LINUX_DMAPOOL_H
#define LINUX_DMAPOOL_H
+#include <linux/scatterlist.h>
#include <asm/io.h>
-#include <asm/scatterlist.h>
struct device;
@@ -24,6 +24,12 @@ void dma_pool_destroy(struct dma_pool *pool);
void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
dma_addr_t *handle);
+static inline void *dma_pool_zalloc(struct dma_pool *pool, gfp_t mem_flags,
+ dma_addr_t *handle)
+{
+ return dma_pool_alloc(pool, mem_flags | __GFP_ZERO, handle);
+}
+
void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);
/*