* [PATCH] [serial gadget] Disable endpoints on unload
@ 2007-09-26 20:36 Vitaly Bordug
0 siblings, 0 replies; only message in thread
From: Vitaly Bordug @ 2007-09-26 20:36 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev
After Serial gadget is being unloaded, neither serial itself, nor other
gadget stuff can be loaded subsequently.
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
---
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 ce4d2e0..594284a 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -1487,6 +1487,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);
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-09-26 20:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 20:36 [PATCH] [serial gadget] Disable endpoints on unload Vitaly Bordug
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).