#ifdef LINUX_V22
void comedi_unmap(struct vm_area_struct *area)
{
- comedi_async *async = area->vm_private_data;
+ comedi_async *async;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,17)
+ async = (void *)area->vm_pte;
+#else
+ async = area->vm_private_data;
+#endif
async->mmap_count--;
}
//vma->vm_file = file;
vma->vm_ops = &comedi_vm_ops;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,17)
+ (void *)vma->vm_pte = async;
+#else
vma->vm_private_data = async;
+#endif
async->mmap_count++;