]> git.sur5r.net Git - u-boot/commitdiff
usb, composite: after unregister gadget driver set composite to NULL
authorHeiko Schocher <hs@denx.de>
Tue, 4 Jun 2013 09:21:32 +0000 (11:21 +0200)
committerMarek Vasut <marex@denx.de>
Wed, 12 Jun 2013 20:22:52 +0000 (22:22 +0200)
Without this, second usb_composite_register() call fails always
with -EINVAL.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
drivers/usb/gadget/composite.c

index 2c5600ed5210c9da2e2450132d11d1c65a41578e..f30778a163b2950b2681a5ea9b610a7d74d10fb3 100644 (file)
@@ -1098,4 +1098,5 @@ void usb_composite_unregister(struct usb_composite_driver *driver)
        if (composite != driver)
                return;
        usb_gadget_unregister_driver(&composite_driver);
+       composite = NULL;
 }