From 7e83b3964ee190fec8e72e8d4a312616f71805e5 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Mon, 29 Jan 2001 01:10:23 +0000 Subject: [PATCH] made comedi_mmap_v22() mark subdevice as mmapped --- comedi/comedi_fops.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 1a527b1e..492567a4 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -1250,7 +1250,7 @@ static int do_cancel(comedi_device *dev,comedi_subdevice *s) issues: what happens when the underlying buffer gets changed? - + */ static int comedi_mmap_v22(struct file * file, struct vm_area_struct *vma) { @@ -1275,13 +1275,14 @@ static int comedi_mmap_v22(struct file * file, struct vm_area_struct *vma) } rvmmap(s->prealloc_buf,s->prealloc_bufsz,vma); - + //vma->vm_file = file; //vma->vm_ops = &comedi_vm_ops; //file_atomic_inc(&file->f_count); - /* XXX mark subdev as mapped */ - + /* mark subdev as mapped */ + s->subdev_flags |= SDF_MMAPPED; + return 0; } #endif -- 2.26.2