Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276319
b: refs/heads/master
c: df30b21
h: refs/heads/master
i:
  276317: 302d930
  276315: 0122aa9
  276311: 993af75
  276303: ca13641
  276287: 67b715b
v: v3
  • Loading branch information
Federico Vaga authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent 564111d commit 4ee37ee
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ffab428f40849ed5f21bcfd7285bdef7902f9ca
refs/heads/master: df30b21cb0eed5ba8a8e0cdfeebc66ba8cde821d
19 changes: 17 additions & 2 deletions trunk/drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,21 @@ static int do_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
return ret;
}

static void comedi_unmap(struct vm_area_struct *area)

static void comedi_vm_open(struct vm_area_struct *area)
{
struct comedi_async *async;
struct comedi_device *dev;

async = area->vm_private_data;
dev = async->subdevice->device;

mutex_lock(&dev->mutex);
async->mmap_count++;
mutex_unlock(&dev->mutex);
}

static void comedi_vm_close(struct vm_area_struct *area)
{
struct comedi_async *async;
struct comedi_device *dev;
Expand All @@ -1446,7 +1460,8 @@ static void comedi_unmap(struct vm_area_struct *area)
}

static struct vm_operations_struct comedi_vm_ops = {
.close = comedi_unmap,
.open = comedi_vm_open,
.close = comedi_vm_close,
};

static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
Expand Down

0 comments on commit 4ee37ee

Please sign in to comment.