usb: dwc3: core: allow device to runtime_suspend several times
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 28 Jul 2016 10:07:07 +0000 (13:07 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 22 Aug 2016 07:45:11 +0000 (10:45 +0300)
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>
drivers/usb/dwc3/core.c

index 946643157b78988a5c45655d9afe55a91d960b3d..35d092456bec1da828ea41476e421d47809380a5 100644 (file)
@@ -1192,6 +1192,7 @@ static int dwc3_runtime_resume(struct device *dev)
        }
 
        pm_runtime_mark_last_busy(dev);
+       pm_runtime_put(dev);
 
        return 0;
 }