diff options
author | Pete Zaitcev <zaitcev@redhat.com> | 2008-03-20 08:29:51 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 08:16:43 +0400 |
commit | 454459b02ea9c8e850fd0b4e770037daf9a7b758 (patch) | |
tree | 5915dc91bb89afc28ef8c270e03b712c32f331e8 /drivers/usb/mon/mon_bin.c | |
parent | d43a05fdc2b5675efc45c32d427ff987a10b617a (diff) | |
download | linux-454459b02ea9c8e850fd0b4e770037daf9a7b758.tar.xz |
usbmon: restore mmap
Paolo asked to enable the mmap. I kept it off because I'm do not
entirely understand how it workse these days after ->nopage etc.
But it seems like working somewhat at least.
Signed-Off-By: Pete Zaitcev <zaitcev@gmail.com>
Cc: Paolo Abeni <paolo.abeni@email.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/mon/mon_bin.c')
-rw-r--r-- | drivers/usb/mon/mon_bin.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 1774ba5c4c3b..49145534e06e 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c @@ -1026,8 +1026,6 @@ mon_bin_poll(struct file *file, struct poll_table_struct *wait) return mask; } -#if 0 - /* * open and close: just keep track of how many times the device is * mapped, to use the proper memory allocation function. @@ -1063,13 +1061,13 @@ static int mon_bin_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) return 0; } -struct vm_operations_struct mon_bin_vm_ops = { +static struct vm_operations_struct mon_bin_vm_ops = { .open = mon_bin_vma_open, .close = mon_bin_vma_close, .fault = mon_bin_vma_fault, }; -int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) +static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) { /* don't do anything here: "fault" will set up page table entries */ vma->vm_ops = &mon_bin_vm_ops; @@ -1079,8 +1077,6 @@ int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) return 0; } -#endif /* 0 */ - static const struct file_operations mon_fops_binary = { .owner = THIS_MODULE, .open = mon_bin_open, @@ -1090,6 +1086,7 @@ static const struct file_operations mon_fops_binary = { .poll = mon_bin_poll, .ioctl = mon_bin_ioctl, .release = mon_bin_release, + .mmap = mon_bin_mmap, }; static int mon_bin_wait_event(struct file *file, struct mon_reader_bin *rp) |