Re: [PATCH 123/142] USB: serial gadget: Disable endpoints on unload
David Brownell <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Friday 12 October 2007, Greg Kroah-Hartman wrote: > From: Vitaly Bordug <[email protected]> > > After Serial gadget is being unloaded, neither serial itself, nor other > gadget stuff can be loaded subsequently. Just for the record, this *should not be needed* since the controller driver should clean up all the relevant state. - Dave > Signed-off-by: Vitaly Bordug <[email protected]> > Signed-off-by: Greg Kroah-Hartman <[email protected]> > --- > drivers/usb/gadget/serial.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c > index afdf71f..a2a1ebc 100644 > --- a/drivers/usb/gadget/serial.c > +++ b/drivers/usb/gadget/serial.c > @@ -1470,6 +1470,12 @@ static void /* __init_or_exit */ gs_unbind(struct usb_gadget *gadget) > dev->dev_ctrl_req = NULL; > } > gs_free_ports(dev); > + if (dev->dev_notify_ep) > + usb_ep_disable(dev->dev_notify_ep); > + if (dev->dev_in_ep) > + usb_ep_disable(dev->dev_in_ep); > + if (dev->dev_out_ep) > + usb_ep_disable(dev->dev_out_ep); > kfree(dev); > set_gadget_data(gadget, NULL); > } ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel