aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorVitaly Bordug <vitb@kernel.crashing.org>2007-09-26 16:36:22 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:55:30 -0400
commit437f375f262417b484f28007c3e8d21bd01d0e01 (patch)
treec687fe67514f56d978a44dae97829319ec89b700 /drivers/usb
parenta59048d46303c4146993c37f51ed97a760fc4c0a (diff)
USB: serial gadget: Disable endpoints on unload
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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/serial.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index afdf71f76f7e..a2a1ebc947d2 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)
1470 dev->dev_ctrl_req = NULL; 1470 dev->dev_ctrl_req = NULL;
1471 } 1471 }
1472 gs_free_ports(dev); 1472 gs_free_ports(dev);
1473 if (dev->dev_notify_ep)
1474 usb_ep_disable(dev->dev_notify_ep);
1475 if (dev->dev_in_ep)
1476 usb_ep_disable(dev->dev_in_ep);
1477 if (dev->dev_out_ep)
1478 usb_ep_disable(dev->dev_out_ep);
1473 kfree(dev); 1479 kfree(dev);
1474 set_gadget_data(gadget, NULL); 1480 set_gadget_data(gadget, NULL);
1475 } 1481 }