compat: backport dma_alloc_coherent
PATCH 1/1 compat: backport dma_alloc_coherent
From: Johannes Berg <[email protected]>
This is needed now for some wireless drivers.
Simply copy the upstream implementation.
Signed-off-by Johannes Berg <[email protected]>
---
include/linux/compat-3.2.h +9 -0
@@ -10,6 +10,15 @@#define PMSG_IS_AUTO (msg) (((msg).event & PM_EVENT_AUTO) != 0) +static inline void *dma_zalloc_coherent (struct device *dev,size_t size, +dma_addr_t *dma_handle,gfp_t flag) +{ +void *ret =dma_alloc_coherent (dev, size, dma_handle, flag); +if (ret) +memset (ret,0 , size); +return ret; +} +/** * skb_frag_page - retrieve the page refered to by a paged fragment * @frag: the paged fragment
Err, subject should be "backport dma_zalloc_coherent" ...
johannes