From: David Schleef Date: Fri, 2 Mar 2001 06:43:48 +0000 (+0000) Subject: Fix previous vm changes for 2.2 (I think) X-Git-Tag: r0_7_57~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ff01da034907d026dfe339ccc199f7654b7f1e46;p=comedi.git Fix previous vm changes for 2.2 (I think) --- 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++;