diff options
author | Fredrik Noring <noring@nocrew.org> | 2019-05-29 13:28:39 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-06-03 16:00:07 +0200 |
commit | da83a722959a82733c3ca60030cc364ca2318c5a (patch) | |
tree | 010b99492c9ff68db6634b5f7f8cd1278b8f88d9 /include/linux/genalloc.h | |
parent | dd3dcede9fa0a0b661ac1f24843f4a1b1317fdb6 (diff) | |
download | blackbird-op-linux-da83a722959a82733c3ca60030cc364ca2318c5a.tar.gz blackbird-op-linux-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.h | 1 |
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 *); |