From: Felipe Balbi Date: Sat, 18 Oct 2014 01:15:08 +0000 (-0500) Subject: usb: dwc2: gadget: do not call usb_gadget_unregister_driver() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0d3ca262699fd6d7c5dcc25ff29a711851797117;p=openwrt%2Fstaging%2Fblogic.git usb: dwc2: gadget: do not call usb_gadget_unregister_driver() 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 441f1c4b8eb4..701d3e142bbf 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -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;