--- /dev/null
+#ifndef LINUX_BACKPORTS_PRIVATE_H
+#define LINUX_BACKPORTS_PRIVATE_H
+
+#include <linux/version.h>
+
+#ifdef CPTCFG_BACKPORT_BUILD_DMA_SHARED_BUFFER
+int __init dma_buf_init(void);
+void __exit dma_buf_deinit(void);
+#else
+static inline int __init dma_buf_init(void) { return 0; }
+static inline void __exit dma_buf_deinit(void) { }
+#endif
+
+#endif /* LINUX_BACKPORTS_PRIVATE_H */
#include <linux/pm_qos.h>
#include <linux/workqueue.h>
#include "compat-2.6.34.h"
+#include "backports.h"
MODULE_AUTHOR("Luis R. Rodriguez");
MODULE_DESCRIPTION("Kernel backport module");
backport_pm_qos_power_init();
backport_system_workqueue_create();
backport_init_mmc_pm_flags();
+ dma_buf_init();
printk(KERN_INFO "Loading modules backported from " BACKPORTED_KERNEL_NAME
#ifndef BACKPORTS_GIT_TRACKED
+#include <linux/fdtable.h>
+#include <linux/bitops.h>
+#include <linux/sched.h>
+ #include <linux/debugfs.h>
+ #include <linux/seq_file.h>
- static inline int is_dma_buf_file(struct file *);
-
-@@ -126,6 +130,27 @@ struct dma_buf *dma_buf_export(void *pri
+@@ -147,6 +151,27 @@ struct dma_buf *dma_buf_export_named(voi
}
- EXPORT_SYMBOL_GPL(dma_buf_export);
+ EXPORT_SYMBOL_GPL(dma_buf_export_named);
+static void dma_buf_fd_set_flag(int fd, int flags)
+{
/**
* dma_buf_fd - returns a file descriptor for the given dma_buf
-@@ -141,9 +166,10 @@ int dma_buf_fd(struct dma_buf *dmabuf, i
+@@ -162,9 +187,10 @@ int dma_buf_fd(struct dma_buf *dmabuf, i
if (!dmabuf || !dmabuf->file)
return -EINVAL;
fd_install(fd, dmabuf->file);
+@@ -696,17 +722,15 @@ static inline void dma_buf_uninit_debugf
+ }
+ #endif
+
+-static int __init dma_buf_init(void)
++int __init dma_buf_init(void)
+ {
+ mutex_init(&db_list.lock);
+ INIT_LIST_HEAD(&db_list.head);
+ dma_buf_init_debugfs();
+ return 0;
+ }
+-subsys_initcall(dma_buf_init);
+
+-static void __exit dma_buf_deinit(void)
++void __exit dma_buf_deinit(void)
+ {
+ dma_buf_uninit_debugfs();
+ }
+-__exitcall(dma_buf_deinit);