[COMMON] usb: xhci: move location of wake_unlock for stable
authorKisang Lee <kisang80.lee@samsung.com>
Wed, 27 Jun 2018 02:05:43 +0000 (11:05 +0900)
committerKisang Lee <kisang80.lee@samsung.com>
Wed, 27 Jun 2018 02:24:28 +0000 (11:24 +0900)
Change-Id: I4c251312240342304a8631d81c63f06a240f4d83
Signed-off-by: Kisang Lee <kisang80.lee@samsung.com>
drivers/usb/host/xhci-plat.c

index a8703f6ba527c114199c5b558bc1373a889dba73..7524a166c3b52d38bfdae41dda87657485a49a37 100644 (file)
@@ -532,6 +532,10 @@ static int xhci_plat_remove(struct platform_device *dev)
        }
        xhci_dbg(xhci, "%s: waited %dmsec", __func__, timeout);
 
+       dev_info(&dev->dev, "WAKE UNLOCK\n");
+       wake_unlock(xhci->wakelock);
+       wake_lock_destroy(xhci->wakelock);
+
        xhci->xhc_state |= XHCI_STATE_REMOVING;
 
        usb_remove_hcd(xhci->shared_hcd);
@@ -553,10 +557,6 @@ static int xhci_plat_remove(struct platform_device *dev)
                clk_disable_unprepare(clk);
        usb_put_hcd(hcd);
 
-       dev_info(&dev->dev, "WAKE UNLOCK\n");
-       wake_unlock(xhci->wakelock);
-       wake_lock_destroy(xhci->wakelock);
-
        pm_runtime_set_suspended(&dev->dev);
        pm_runtime_disable(&dev->dev);