Some kernels apparently have this backported, and it doesn't
hurt to protect the symbol since we patch it in anyway for
those files needing it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) && \
LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
+#define vb2_mmap_pfn_range LINUX_BACKPORT(vb2_mmap_pfn_range)
int vb2_mmap_pfn_range(struct vm_area_struct *vma, unsigned long paddr,
unsigned long size,
const struct vm_operations_struct *vm_ops,
#include <linux/err.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#include <media/videobuf2-memops.h>
/**
* vb2_mmap_pfn_range() - map physical pages to userspace
* @vma: virtual memory region for the mapping