projects
/
~tnikolova
/
compat
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
984ab77
)
Add dma_zalloc_coherent to fix build with kernels older than 3.2
author
Nikolay Martynov
<mar.kolya@gmail.com>
Mon, 16 Jan 2012 05:07:55 +0000
(
00:07
-0500)
committer
Luis R. Rodriguez
<mcgrof@frijolero.org>
Mon, 16 Jan 2012 23:34:41 +0000
(15:34 -0800)
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
include/linux/compat-3.2.h
patch
|
blob
|
history
diff --git
a/include/linux/compat-3.2.h
b/include/linux/compat-3.2.h
index
fb9ef68
..
a17c4ad
100644
(file)
--- a/
include/linux/compat-3.2.h
+++ b/
include/linux/compat-3.2.h
@@
-64,6
+64,15
@@
static inline char *hex_byte_pack(char *buf, u8 byte)
module_driver(__platform_driver, platform_driver_register, \
platform_driver_unregister)
+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;
+}
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)) */
#endif /* LINUX_3_2_COMPAT_H */