projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6921ad
)
USB: gadget: atmel: disconnect before unbind
author
Bo Shen
<voice.shen@atmel.com>
Tue, 24 Sep 2013 05:19:24 +0000
(13:19 +0800)
committer
Marek Vasut
<marex@denx.de>
Tue, 24 Sep 2013 15:51:36 +0000
(17:51 +0200)
When unbind the gadget driver, need call disconnect first.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
drivers/usb/gadget/atmel_usba_udc.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/atmel_usba_udc.c
b/drivers/usb/gadget/atmel_usba_udc.c
index
f146c48
..
c99208d
100644
(file)
--- a/
drivers/usb/gadget/atmel_usba_udc.c
+++ b/
drivers/usb/gadget/atmel_usba_udc.c
@@
-1240,11
+1240,12
@@
int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
{
struct usba_udc *udc = &controller;
- if (!driver || !driver->
bind || !driver->setup
) {
+ if (!driver || !driver->
unbind || !driver->disconnect
) {
error("bad paramter\n");
return -EINVAL;
}
+ driver->disconnect(&udc->gadget);
driver->unbind(&udc->gadget);
udc->driver = NULL;