aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@redhat.com>2008-03-20 01:29:51 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:43 -0400
commit454459b02ea9c8e850fd0b4e770037daf9a7b758 (patch)
tree5915dc91bb89afc28ef8c270e03b712c32f331e8 /drivers/usb
parentd43a05fdc2b5675efc45c32d427ff987a10b617a (diff)
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')
-rw-r--r--drivers/usb/mon/mon_bin.c9
-rw-r--r--drivers/usb/mon/mon_main.c3
2 files changed, 4 insertions, 8 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)
1026 return mask; 1026 return mask;
1027} 1027}
1028 1028
1029#if 0
1030
1031/* 1029/*
1032 * open and close: just keep track of how many times the device is 1030 * open and close: just keep track of how many times the device is
1033 * mapped, to use the proper memory allocation function. 1031 * 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)
1063 return 0; 1061 return 0;
1064} 1062}
1065 1063
1066struct vm_operations_struct mon_bin_vm_ops = { 1064static struct vm_operations_struct mon_bin_vm_ops = {
1067 .open = mon_bin_vma_open, 1065 .open = mon_bin_vma_open,
1068 .close = mon_bin_vma_close, 1066 .close = mon_bin_vma_close,
1069 .fault = mon_bin_vma_fault, 1067 .fault = mon_bin_vma_fault,
1070}; 1068};
1071 1069
1072int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) 1070static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma)
1073{ 1071{
1074 /* don't do anything here: "fault" will set up page table entries */ 1072 /* don't do anything here: "fault" will set up page table entries */
1075 vma->vm_ops = &mon_bin_vm_ops; 1073 vma->vm_ops = &mon_bin_vm_ops;
@@ -1079,8 +1077,6 @@ int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma)
1079 return 0; 1077 return 0;
1080} 1078}
1081 1079
1082#endif /* 0 */
1083
1084static const struct file_operations mon_fops_binary = { 1080static const struct file_operations mon_fops_binary = {
1085 .owner = THIS_MODULE, 1081 .owner = THIS_MODULE,
1086 .open = mon_bin_open, 1082 .open = mon_bin_open,
@@ -1090,6 +1086,7 @@ static const struct file_operations mon_fops_binary = {
1090 .poll = mon_bin_poll, 1086 .poll = mon_bin_poll,
1091 .ioctl = mon_bin_ioctl, 1087 .ioctl = mon_bin_ioctl,
1092 .release = mon_bin_release, 1088 .release = mon_bin_release,
1089 .mmap = mon_bin_mmap,
1093}; 1090};
1094 1091
1095static int mon_bin_wait_event(struct file *file, struct mon_reader_bin *rp) 1092static int mon_bin_wait_event(struct file *file, struct mon_reader_bin *rp)
diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c
index b371ffd39d36..442d8076b201 100644
--- a/drivers/usb/mon/mon_main.c
+++ b/drivers/usb/mon/mon_main.c
@@ -129,8 +129,7 @@ static void mon_submit_error(struct usb_bus *ubus, struct urb *urb, int error)
129 129
130/* 130/*
131 */ 131 */
132static void mon_bus_complete(struct mon_bus *mbus, struct urb *urb, 132static void mon_bus_complete(struct mon_bus *mbus, struct urb *urb, int status)
133 int status)
134{ 133{
135 unsigned long flags; 134 unsigned long flags;
136 struct list_head *pos; 135 struct list_head *pos;