diff options
author | Sean O. Stalley <sean.stalley@intel.com> | 2015-09-08 15:02:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-08 15:35:28 -0700 |
commit | ad82362b2defd4adad87d8538617b2f51a4bf9c3 (patch) | |
tree | 6d6f1b7736e52009d624011a149f6f36afd709ec /include/linux/dmapool.h | |
parent | fa23f56d90ed7bd760ae2aea6dfb2f501a099e90 (diff) | |
download | linux-stable-ad82362b2defd4adad87d8538617b2f51a4bf9c3.tar.gz linux-stable-ad82362b2defd4adad87d8538617b2f51a4bf9c3.tar.bz2 linux-stable-ad82362b2defd4adad87d8538617b2f51a4bf9c3.zip |
mm: add dma_pool_zalloc() call to DMA API
Add a wrapper function for dma_pool_alloc() to get zeroed memory.
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>
Cc: Nicolas Palix <nicolas.palix@imag.fr>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/dmapool.h')
-rw-r--r-- | include/linux/dmapool.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h index e1043f79122f..53ba737505df 100644 --- a/include/linux/dmapool.h +++ b/include/linux/dmapool.h @@ -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); /* |