Replaced VM_RESERVED for kernel 3.7. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Tue, 12 Feb 2013 10:32:37 +0100
branchstable-1.5
changeset 2516 3680924f6f87
parent 2515 1f03f2543fc3
child 2517 b5214d8e48d1
Replaced VM_RESERVED for kernel 3.7.
master/cdev.c
--- a/master/cdev.c	Fri Feb 08 20:03:37 2013 +0100
+++ b/master/cdev.c	Tue Feb 12 10:32:37 2013 +0100
@@ -212,6 +212,12 @@
 
 /*****************************************************************************/
 
+#ifndef VM_DONTDUMP
+/** VM_RESERVED disappeared in 3.7.
+ */
+#define VM_DONTDUMP VM_RESERVED
+#endif
+
 /** Memory-map callback for the EtherCAT character device.
  *
  * The actual mapping will be done in the eccdev_vma_nopage() callback of the
@@ -227,7 +233,7 @@
     EC_MASTER_DBG(priv->cdev->master, 1, "mmap()\n");
 
     vma->vm_ops = &eccdev_vm_ops;
-    vma->vm_flags |= VM_RESERVED; /* Pages will not be swapped out */
+    vma->vm_flags |= VM_DONTDUMP; /* Pages will not be swapped out */
     vma->vm_private_data = priv;
 
     return 0;