aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/zero.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-01-20 17:38:49 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-31 20:23:44 -0500
commit69396dcfa3c50a6b8d2caaccf5d1496ecd5594be (patch)
tree8ff771e3d9cfdd91d19add3369234ac8f1081438 /drivers/usb/gadget/zero.c
parentc02c4bb2058587d3c012ec08268fd93fdc654ae7 (diff)
[PATCH] USB: gadget zero and dma-coherent buffers
This makes sure that the correct length is reported when freeing a dma-coherent buffer; some platforms complain if that's wrong. It also makes two parameters readonly in sysfs, as they're not safe to change while tests are running. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/zero.c')
-rw-r--r--drivers/usb/gadget/zero.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 2fc110d3ad5a..ae7a1c0f5748 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -165,8 +165,8 @@ static unsigned buflen = 4096;
165static unsigned qlen = 32; 165static unsigned qlen = 32;
166static unsigned pattern = 0; 166static unsigned pattern = 0;
167 167
168module_param (buflen, uint, S_IRUGO|S_IWUSR); 168module_param (buflen, uint, S_IRUGO);
169module_param (qlen, uint, S_IRUGO|S_IWUSR); 169module_param (qlen, uint, S_IRUGO);
170module_param (pattern, uint, S_IRUGO|S_IWUSR); 170module_param (pattern, uint, S_IRUGO|S_IWUSR);
171 171
172/* 172/*
@@ -1127,8 +1127,10 @@ zero_unbind (struct usb_gadget *gadget)
1127 DBG (dev, "unbind\n"); 1127 DBG (dev, "unbind\n");
1128 1128
1129 /* we've already been disconnected ... no i/o is active */ 1129 /* we've already been disconnected ... no i/o is active */
1130 if (dev->req) 1130 if (dev->req) {
1131 dev->req->length = USB_BUFSIZ;
1131 free_ep_req (gadget->ep0, dev->req); 1132 free_ep_req (gadget->ep0, dev->req);
1133 }
1132 del_timer_sync (&dev->resume); 1134 del_timer_sync (&dev->resume);
1133 kfree (dev); 1135 kfree (dev);
1134 set_gadget_data (gadget, NULL); 1136 set_gadget_data (gadget, NULL);