[U-Boot] [PATCH v4 3/5] usb: musb: fill in usb_gadget_unregister_driver

Lukasz Majewski
2014-04-23T09:46:10Z

Hi Rob,

> From: Rob Herring <robh@kernel.org>
>
> Add missing missing disconnect and unbind calls to the musb gadget
^^^^^^^ I suppose that one missing is redundant.

> driver's usb_gadget_unregister_driver function. Otherwise, any gadget
> drivers fail to uninitialize and run a 2nd time.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/usb/musb-new/musb_uboot.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/musb-new/musb_uboot.c
> b/drivers/usb/musb-new/musb_uboot.c index 0512680..0d7b89f 100644
> --- a/drivers/usb/musb-new/musb_uboot.c
> +++ b/drivers/usb/musb-new/musb_uboot.c
> @@ -204,7 +204,10 @@ int usb_gadget_register_driver(struct
> usb_gadget_driver *driver)
> int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
> {
> - /* TODO: implement me */
> + if (driver->disconnect)
> + driver->disconnect(&gadget->g);
> + if (driver->unbind)
> + driver->unbind(&gadget->g);
> return 0;
> }
> #endif /* CONFIG_MUSB_GADGET */

Despite the minor problem with commit message, the rest seems correct.

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

--
Best regards,

Lukasz Majewski

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