]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOServicePM.cpp
xnu-1504.3.12.tar.gz
[apple/xnu.git] / iokit / Kernel / IOServicePM.cpp
index fd150a4f64290e91816765fe434a652f47b606ff..c7b4319ed3b49067ab99dc5434066203f4942b4d 100644 (file)
@@ -2950,6 +2950,17 @@ IOReturn IOService::startPowerChange (
                         &powerState, changeFlags);
 #endif
 
+    // Invalidate the last recorded tickle power state when a power transition
+    // is about to occur, and not as a result of a tickle request.
+
+    if ((getPMRequestType() != kIOPMRequestTypeActivityTickle) &&
+        (fActivityTicklePowerState != -1))
+    {
+        IOLockLock(fActivityLock);
+        fActivityTicklePowerState = -1;
+        IOLockUnlock(fActivityLock);
+    }
+
        // Initialize the change note.
 
     fHeadNoteFlags            = changeFlags;