dma_buf_export() got a new parameter which is not available in older
kernel versions.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 backport/backport-include/linux/dma-buf.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/backport/backport-include/linux/dma-buf.h 
b/backport/backport-include/linux/dma-buf.h
index 363b86f..85a1531 100644
--- a/backport/backport-include/linux/dma-buf.h
+++ b/backport/backport-include/linux/dma-buf.h
@@ -5,4 +5,13 @@
 #include_next <linux/dma-buf.h>
 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#define dma_buf_export(priv, ops, size, flags, resv)   \
+       dma_buf_export(priv, ops, size, flags)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)
+#undef dma_buf_export
+#define dma_buf_export(priv, ops, size, flags, resv)   \
+       dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME)
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
+
 #endif /* _BACKPORT_DMA_BUF_H__ */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to