From linux-usb-devel-admin@lists.sourceforge.net Wed Sep 7 18:37:49 2005 From: David Brownell To: Greg KH Message-Id: <200509070949.34879.david-b@pacbell.net> Subject: USB gadgetfs: fixes an error on writing to endpoint file Date: Wed, 7 Sep 2005 09:49:34 -0700 From: Pavol Kurina this patch fixes an "Invalid argument" error returned by a write to an endpoint-file after reopening it in the gadgetfs module in the kernel 2.6.12. This was testet only with dummy_hcd module! Signed-off-by: Pavol Kurina Signed-off-by: David Brownell --- drivers/usb/gadget/inode.c | 1 + 1 file changed, 1 insertion(+) --- gregkh-2.6.orig/drivers/usb/gadget/inode.c 2005-08-28 16:41:01.000000000 -0700 +++ gregkh-2.6/drivers/usb/gadget/inode.c 2005-09-12 11:02:00.000000000 -0700 @@ -483,6 +483,7 @@ ep_release (struct inode *inode, struct data->state = STATE_EP_DISABLED; data->desc.bDescriptorType = 0; data->hs_desc.bDescriptorType = 0; + usb_ep_disable(data->ep); } put_ep (data); return 0;