public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] USB: gadget: atmel: disconnect before unbind
@ 2013-09-24  5:19 Bo Shen
  2013-09-24 15:51 ` Marek Vasut
  0 siblings, 1 reply; 2+ messages in thread
From: Bo Shen @ 2013-09-24  5:19 UTC (permalink / raw)
  To: u-boot

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 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index f146c48..c99208d 100644
--- 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;
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] USB: gadget: atmel: disconnect before unbind
  2013-09-24  5:19 [U-Boot] [PATCH] USB: gadget: atmel: disconnect before unbind Bo Shen
@ 2013-09-24 15:51 ` Marek Vasut
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Vasut @ 2013-09-24 15:51 UTC (permalink / raw)
  To: u-boot

Dear Bo Shen,

> When unbind the gadget driver, need call disconnect first.
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>

Applied, thanks

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-24 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-24  5:19 [U-Boot] [PATCH] USB: gadget: atmel: disconnect before unbind Bo Shen
2013-09-24 15:51 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox