[U-Boot] usb, composite: after unregister gadget driver set composite to NULL

Heiko Schocher hs at denx.de
Tue Jun 4 11:21:32 CEST 2013


Without this, second usb_composite_register() call fails always
with -EINVAL.

Signed-off-by: Heiko Schocher <hs at denx.de>
Cc: Lukasz Majewski <l.majewski at samsung.com>
Cc: Kyungmin Park <kyungmin.park at samsung.com>
Cc: Marek Vasut <marex at denx.de>
---
 drivers/usb/gadget/composite.c | 1 +
 1 Datei geändert, 1 Zeile hinzugefügt(+)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 0716e52..f867793 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1099,4 +1099,5 @@ void usb_composite_unregister(struct usb_composite_driver *driver)
 	if (composite != driver)
 		return;
 	usb_gadget_unregister_driver(&composite_driver);
+	composite = NULL;
 }
-- 
1.7.11.7



More information about the U-Boot mailing list