Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea529ebb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3-msm: Fix some cleanup during remove"

parents da9d9f1e b2a2d2d7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2951,6 +2951,7 @@ static int dwc3_msm_remove(struct platform_device *pdev)
	struct dwc3_msm	*mdwc = platform_get_drvdata(pdev);

	pm_runtime_disable(mdwc->dev);
	pm_runtime_set_suspended(mdwc->dev);
	device_wakeup_disable(mdwc->dev);

	if (mdwc->ext_chg_device) {
@@ -2968,6 +2969,8 @@ static int dwc3_msm_remove(struct platform_device *pdev)
		dwc3_start_chg_det(&mdwc->charger, false);
	if (mdwc->usb_psy.dev)
		power_supply_unregister(&mdwc->usb_psy);
	if (mdwc->hs_phy)
		mdwc->hs_phy->flags &= ~PHY_HOST_MODE;

	platform_device_put(mdwc->dwc3);
	device_for_each_child(&pdev->dev, NULL, dwc3_msm_remove_children);
@@ -2975,6 +2978,9 @@ static int dwc3_msm_remove(struct platform_device *pdev)
	if (!IS_ERR_OR_NULL(mdwc->vbus_otg))
		regulator_disable(mdwc->vbus_otg);

	disable_irq_wake(mdwc->hs_phy_irq);

	clk_disable_unprepare(mdwc->utmi_clk);
	clk_disable_unprepare(mdwc->core_clk);
	clk_disable_unprepare(mdwc->iface_clk);
	clk_disable_unprepare(mdwc->sleep_clk);