===================================================================
@@ -1606,13 +1606,13 @@ static int __device_suspend(struct devic
}
/*
- * If a device configured to wake up the system from sleep states
- * has been suspended at run time and there's a resume request pending
- * for it, this is equivalent to the device signaling wakeup, so the
- * system suspend operation should be aborted.
+ * If there's a runtime resume request pending for the device, resume
+ * it before proceeding with invoking the system-wide suspend callbacks
+ * for it, because the physical state of the device may not reflect the
+ * "suspended" runtime PM status already in that case.
*/
- if (pm_runtime_barrier(dev) && device_may_wakeup(dev))
- pm_wakeup_event(dev, 0);
+ if (pm_runtime_barrier(dev))
+ pm_runtime_resume(dev);
if (pm_wakeup_pending()) {
dev->power.direct_complete = false;