From: Wu Liang feng Date: Mon, 15 Aug 2016 07:47:21 +0000 (+0800) Subject: phy: rockchip-inno-usb2: don't cancel otg_sm_work when phy exit X-Git-Tag: firefly_0821_release~1753 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7b082cbcee5be6eb89e91be4df173915043cfbbb;p=firefly-linux-kernel-4.4.55.git phy: rockchip-inno-usb2: don't cancel otg_sm_work when phy exit The otg_sm_work is a OTG state machine delay work. It will hold a wake lock if SDP cable or CDP cable is attached, and release the wake lock if cable dettached. If usb controller(e.g. DWC3) call phy exit When USB cable is dettached and cancel otg_sm_work, it will cause the usb phy keeping hold of wake lock. Change-Id: Ie6a89e481b8d4999a996083709bacc5be901805a Signed-off-by: Wu Liang feng --- diff --git a/drivers/phy/phy-rockchip-inno-usb2.c b/drivers/phy/phy-rockchip-inno-usb2.c index 07022597701d..dd05bff4b53c 100644 --- a/drivers/phy/phy-rockchip-inno-usb2.c +++ b/drivers/phy/phy-rockchip-inno-usb2.c @@ -501,7 +501,6 @@ static int rockchip_usb2phy_exit(struct phy *phy) if (rport->port_id == USB2PHY_PORT_OTG) { cancel_delayed_work_sync(&rport->chg_work); - cancel_delayed_work_sync(&rport->otg_sm_work); } else if (rport->port_id == USB2PHY_PORT_HOST) cancel_delayed_work_sync(&rport->sm_work);