usb: dwc2: gadget: do not call usb_gadget_unregister_driver()
authorFelipe Balbi <balbi@ti.com>
Sat, 18 Oct 2014 01:15:08 +0000 (20:15 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 3 Nov 2014 16:01:18 +0000 (10:01 -0600)
that call is completely unnecessary because
usb_del_gadget_udc() already makes sure the
gadget driver is properly unregistered from
the UDC.

Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c

index 441f1c4b8eb497b32bcb9859cff41074a43f8786..701d3e142bbf3617d8ed07895b40a96d91cefea6 100644 (file)
@@ -3605,14 +3605,7 @@ static int s3c_hsotg_remove(struct platform_device *pdev)
        struct s3c_hsotg *hsotg = platform_get_drvdata(pdev);
 
        usb_del_gadget_udc(&hsotg->gadget);
-
        s3c_hsotg_delete_debug(hsotg);
-
-       if (hsotg->driver) {
-               /* should have been done already by driver model core */
-               usb_gadget_unregister_driver(hsotg->driver);
-       }
-
        clk_disable_unprepare(hsotg->clk);
 
        return 0;