MLK-16221-1 usb: cdns3: add module removal support
authorPeter Chen <peter.chen@nxp.com>
Fri, 18 Aug 2017 09:22:56 +0000 (17:22 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:38:26 +0000 (15:38 -0500)
We need to destroy both host and gadget roles when removing module.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/cdns3/core.c

index 675cb3a..e526018 100644 (file)
@@ -581,6 +581,10 @@ err1:
  */
 static int cdns3_remove(struct platform_device *pdev)
 {
+       struct cdns3 *cdns = platform_get_drvdata(pdev);
+
+       cdns3_remove_roles(cdns);
+
        return 0;
 }