usb, composite: after unregister gadget driver set composite to NULL
Without this, second usb_composite_register() call fails always with -EINVAL.
Signed-off-by Heiko Schocher <[email protected]>
Cc Lukasz Majewski <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Marek Vasut <[email protected]>
--- drivers/usb/gadget/composite.c | 1 +
1 Datei ge?ndert, 1 Zeile hinzugef?gt(+)
drivers/usb/gadget/composite.c +1 -0
@@ -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 ; }
Signature · 1 line
1.7.11.7
Lukasz Majewski
Reviewed-byHi Heiko,
Quoted 16 lines
Without this, second
usb_composite_register()call fails always with-EINVAL.Signed-off-by Heiko Schocher <[email protected]>Cc Lukasz Majewski <[email protected]>Cc Kyungmin Park <[email protected]>Cc Marek Vasut <[email protected]>--- drivers/usb/gadget/composite.c | 1 +1 Datei ge?ndert, 1 Zeile hinzugef?gt(+)
(quoted diff) +0
-0
b/drivers/usb/gadget/composite.cindex 0716e52..f867793 100644
drivers/usb/gadget/composite.c void usb_composite_unregister(struct · line 1102
Quoted 4 lines
drivers/usb/gadget/composite.c +1
-0@@ -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 ;
Thanks for spotting.
drivers/usb/gadget/composite.c void usb_composite_unregister(struct · line 1103
Quoted 1 line
drivers/usb/gadget/composite.c +0
-0}
Reviewed-by Lukasz Majewski <[email protected]>
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Poland Institute (SRPOL) | Linux Platform Group
Marek Vasut
AppliedDear Heiko Schocher,
Quoted 7 lines
Without this, second
usb_composite_register()call fails always with-EINVAL.Signed-off-by Heiko Schocher <[email protected]>Cc Lukasz Majewski <[email protected]>Cc Kyungmin Park <[email protected]>Cc Marek Vasut <[email protected]>
Applied, thanks.
Best regards,
Marek Vasut