Fixed vm_fault. stable-1.5
authorPhilipp Weyer <pw@igh-essen.com>
Mon, 04 Sep 2017 17:24:46 +0200
branchstable-1.5
changeset 2682 8d6833867a56
parent 2681 9953c0d372ab
child 2683 1079c149f22c
Fixed vm_fault.
master/cdev.c
--- a/master/cdev.c	Mon Sep 04 17:12:59 2017 +0200
+++ b/master/cdev.c	Mon Sep 04 17:24:46 2017 +0200
@@ -62,7 +62,11 @@
 #define PAGE_FAULT_VERSION KERNEL_VERSION(2, 6, 23)
 
 #if LINUX_VERSION_CODE >= PAGE_FAULT_VERSION
-static int eccdev_vma_fault(struct vm_area_struct *, struct vm_fault *);
+static int eccdev_vma_fault(
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+        struct vm_area_struct *,
+#endif
+        struct vm_fault *);
 #else
 static struct page *eccdev_vma_nopage(
         struct vm_area_struct *, unsigned long, int *);
@@ -278,8 +282,8 @@
     get_page(page);
     vmf->page = page;
 
-    EC_MASTER_DBG(priv->cdev->master, 1, "Vma fault, virtual_address = %p,"
-            " offset = %lu, page = %p\n", vmf->virtual_address, offset, page);
+    EC_MASTER_DBG(priv->cdev->master, 1, "Vma fault,"
+            " offset = %lu, page = %p\n", offset, page);
 
     return 0;
 }