static int exynos_ohci_remove(struct platform_device *pdev) { struct exynos_ohci_hcd *exynos_ohci = platform_get_drvdata(pdev); struct usb_hcd *hcd = exynos_ohci->hcd; pm_runtime_disable(&pdev->dev); exynos_ohci->power_on = 0; exynos_pm_unregister_notifier(&exynos_ohci->lpa_nb); remove_ohci_sys_file(hcd_to_ohci(hcd)); usb_remove_hcd(hcd); if (exynos_ohci->otg) exynos_ohci->otg->set_host(exynos_ohci->otg, &exynos_ohci->hcd->self); exynos_ohci_phy_disable(exynos_ohci); clk_disable_unprepare(exynos_ohci->clk); usb_put_hcd(hcd); return 0; }
static int s5p_ehci_remove(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); if (s5p_ehci->drvdata->rpm_enable) pm_runtime_disable(&pdev->dev); s5p_ehci->power_on = 0; if (!s5p_ehci->retention) exynos_pm_unregister_notifier(&s5p_ehci->lpa_nb); remove_ehci_sys_file(hcd_to_ehci(hcd)); usb_remove_hcd(hcd); if (s5p_ehci->otg) s5p_ehci->otg->set_host(s5p_ehci->otg, &hcd->self); if (s5p_ehci->phy) { /* Shutdown PHY only if it wasn't shutdown before */ if (!s5p_ehci->post_lpa_resume) usb_phy_shutdown(s5p_ehci->phy); } else if (s5p_ehci->pdata->phy_exit) { s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); } /* clear Host */ if (s5p_ehci->otg) s5p_ehci->otg->host = NULL; s5p_ehci_clk_disable_unprepare(s5p_ehci); usb_put_hcd(hcd); return 0; }
void exynos_unregister_notifier(void *data) { #ifdef CONFIG_ARCH_EXYNOS5 #ifdef CONFIG_CPU_IDLE struct dw_mci *host = (struct dw_mci *)data; int i; for (i = 0; i < 3; i++) { if (host == dw_mci_lpa_host[i]) exynos_pm_unregister_notifier(&(dw_mmc_exynos_notifier_block[i])); } #endif #endif }