Loading...
iokit/Kernel/IOInterruptEventSource.cpp xnu-2422.100.13 xnu-1699.26.8
--- xnu/xnu-2422.100.13/iokit/Kernel/IOInterruptEventSource.cpp
+++ xnu/xnu-1699.26.8/iokit/Kernel/IOInterruptEventSource.cpp
@@ -167,20 +167,19 @@
 
 void IOInterruptEventSource::setWorkLoop(IOWorkLoop *inWorkLoop)
 {
-    if (inWorkLoop) super::setWorkLoop(inWorkLoop);
-
-    if (provider) {
-	if (!inWorkLoop) {
-	    if (intIndex >= 0) {
-		provider->unregisterInterrupt(intIndex);
-		intIndex = ~intIndex;
-	    }
-	} else if ((intIndex < 0) && (kIOReturnSuccess == registerInterruptHandler(provider, ~intIndex))) {
+    super::setWorkLoop(inWorkLoop);
+
+    if (!provider)
+    	return;
+
+    if ( !inWorkLoop ) {
+	if (intIndex >= 0) {
+	    provider->unregisterInterrupt(intIndex);
 	    intIndex = ~intIndex;
 	}
-    }
-
-    if (!inWorkLoop) super::setWorkLoop(inWorkLoop);
+    } else if ((intIndex < 0) && (kIOReturnSuccess == registerInterruptHandler(provider, ~intIndex))) {
+	intIndex = ~intIndex;
+    }
 }
 
 const IOService *IOInterruptEventSource::getProvider() const
@@ -211,14 +210,14 @@
 	{
 		if (trace)
 			IOTimeStampStartConstant(IODBG_INTES(IOINTES_ACTION),
-						 VM_KERNEL_UNSLIDE(intAction), (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
+									 (uintptr_t) intAction, (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
 		
 		// Call the handler
 		(*intAction)(owner, this, numInts);
 		
 		if (trace)
 			IOTimeStampEndConstant(IODBG_INTES(IOINTES_ACTION),
-					       VM_KERNEL_UNSLIDE(intAction), (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
+								   (uintptr_t) intAction, (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
 		
 		consumerCount = cacheProdCount;
 		if (autoDisable && !explicitDisable)
@@ -229,14 +228,14 @@
 	{
 		if (trace)
 			IOTimeStampStartConstant(IODBG_INTES(IOINTES_ACTION),
-						 VM_KERNEL_UNSLIDE(intAction), (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
+									 (uintptr_t) intAction, (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
 		
 		// Call the handler
 		(*intAction)(owner, this, -numInts);
 		
 		if (trace)
 			IOTimeStampEndConstant(IODBG_INTES(IOINTES_ACTION),
-					       VM_KERNEL_UNSLIDE(intAction), (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
+								   (uintptr_t) intAction, (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
 		
 		consumerCount = cacheProdCount;
 		if (autoDisable && !explicitDisable)