aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-07-28 13:07:07 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-08-22 10:45:11 +0300
commitb74c2d875baaa07186f617c5617f4c5e3a8a41ad (patch)
tree1b9bb2106f1e1c1294a6c820c2af7ed3a1a4cce8 /drivers/usb/dwc3/core.c
parentusb: dwc3: pci: runtime_resume child device (diff)
downloadlinux-dev-b74c2d875baaa07186f617c5617f4c5e3a8a41ad.tar.xz
linux-dev-b74c2d875baaa07186f617c5617f4c5e3a8a41ad.zip
usb: dwc3: core: allow device to runtime_suspend several times
After going through runtime_suspend/runtime_resume cycle once we would be left with an unbalanced pm_runtime_get() call. Fix that by making sure that we try to suspend right after resuming so things are balanced and device can runtime_suspend again. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 946643157b78..35d092456bec 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1192,6 +1192,7 @@ static int dwc3_runtime_resume(struct device *dev)
}
pm_runtime_mark_last_busy(dev);
+ pm_runtime_put(dev);
return 0;
}