From ff01da034907d026dfe339ccc199f7654b7f1e46 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 2 Mar 2001 06:43:48 +0000 Subject: [PATCH] Fix previous vm changes for 2.2 (I think) --- comedi/comedi_fops.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 27085cc2..a782ff07 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -1311,7 +1311,13 @@ static int do_cancel(comedi_device *dev,comedi_subdevice *s) #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--; } @@ -1356,7 +1362,11 @@ static int comedi_mmap_v22(struct file * file, struct vm_area_struct *vma) //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++; -- 2.26.2