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

Lukasz Majewski l.majewski at samsung.com
Tue Jun 4 12:17:17 CEST 2013


Hi Heiko,

> 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;

Thanks for spotting.

>  }

Reviewed-by: Lukasz Majewski <l.majewski at samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Poland Institute (SRPOL) | Linux Platform Group


More information about the U-Boot mailing list