aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/genalloc.h
diff options
context:
space:
mode:
authorFredrik Noring <noring@nocrew.org>2019-05-29 13:28:39 +0300
committerChristoph Hellwig <hch@lst.de>2019-06-03 16:00:07 +0200
commitda83a722959a82733c3ca60030cc364ca2318c5a (patch)
tree010b99492c9ff68db6634b5f7f8cd1278b8f88d9 /include/linux/genalloc.h
parentdma-contiguous: fix !CONFIG_DMA_CMA version of dma_{alloc, free}_contiguous() (diff)
downloadlinux-dev-da83a722959a82733c3ca60030cc364ca2318c5a.tar.xz
linux-dev-da83a722959a82733c3ca60030cc364ca2318c5a.zip
lib/genalloc: add gen_pool_dma_zalloc() for zeroed DMA allocations
gen_pool_dma_zalloc() is a zeroed memory variant of gen_pool_dma_alloc(). Also document the return values of both, and indicate NULL as a "%NULL" constant. Signed-off-by: Fredrik Noring <noring@nocrew.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/genalloc.h')
-rw-r--r--include/linux/genalloc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
index dd0a452373e7..6c62eeca754f 100644
--- a/include/linux/genalloc.h
+++ b/include/linux/genalloc.h
@@ -121,6 +121,7 @@ extern unsigned long gen_pool_alloc_algo(struct gen_pool *, size_t,
genpool_algo_t algo, void *data);
extern void *gen_pool_dma_alloc(struct gen_pool *pool, size_t size,
dma_addr_t *dma);
+void *gen_pool_dma_zalloc(struct gen_pool *pool, size_t size, dma_addr_t *dma);
extern void gen_pool_free(struct gen_pool *, unsigned long, size_t);
extern void gen_pool_for_each_chunk(struct gen_pool *,
void (*)(struct gen_pool *, struct gen_pool_chunk *, void *), void *);