summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-10-03 16:39:30 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-14 11:51:16 -0800
commit6f39504de55ef69bb8d9d0a645949c5d0407faab (patch)
tree133190376c9d29efa2731259c4d07c7a2b782c28 /drivers/usb
parent3c2d636a1c6f1f84adf77737ca716f956595ae80 (diff)
downloadlinux-6f39504de55ef69bb8d9d0a645949c5d0407faab.tar.bz2
usb: gadget: core: fix bug when removing gadget drivers
usb_gadget_disconnect() is responsible of removing data pullups. Before doing that we must, first, tell gadget driver we're disconnecting (by calling disconnect method on gadget driver structure), unbind the gadget driver and stop the controller. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c
index 31e410bbe55a..4c5ff14a7c61 100644
--- a/drivers/usb/gadget/udc-core.c
+++ b/drivers/usb/gadget/udc-core.c
@@ -210,10 +210,10 @@ static void usb_gadget_remove_driver(struct usb_udc *udc)
kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE);
if (udc_is_newstyle(udc)) {
- usb_gadget_disconnect(udc->gadget);
+ udc->driver->disconnect(udc->gadget);
udc->driver->unbind(udc->gadget);
usb_gadget_udc_stop(udc->gadget, udc->driver);
-
+ usb_gadget_disconnect(udc->gadget);
} else {
usb_gadget_stop(udc->gadget, udc->driver);
}