aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DMA-API.txt
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2011-11-02 16:39:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-02 19:07:02 -0400
commit842fa69f3e0c9a178b294e7af7c07f4c9d9e7af2 (patch)
tree5c7b18074454b5ffa8e11175cfe7de08e6549ca7 /Documentation/DMA-API.txt
parentc736de60aed869df8a9aba512cdaf89e32545b00 (diff)
include/linux/dma-mapping.h: add dma_zalloc_coherent()
Lots of driver code does a dma_alloc_coherent() and then zeroes out the memory with a memset. Make it easy for them. Cc: Alexandre Bounine <alexandre.bounine@idt.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/DMA-API.txt')
-rw-r--r--Documentation/DMA-API.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index fe2326906610..66bd97a95f10 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -50,6 +50,13 @@ specify the GFP_ flags (see kmalloc) for the allocation (the
50implementation may choose to ignore flags that affect the location of 50implementation may choose to ignore flags that affect the location of
51the returned memory, like GFP_DMA). 51the returned memory, like GFP_DMA).
52 52
53void *
54dma_zalloc_coherent(struct device *dev, size_t size,
55 dma_addr_t *dma_handle, gfp_t flag)
56
57Wraps dma_alloc_coherent() and also zeroes the returned memory if the
58allocation attempt succeeded.
59
53void 60void
54dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 61dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
55 dma_addr_t dma_handle) 62 dma_addr_t dma_handle)