X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..b36670cedae0009469e8ee117453de831de64a6b:/iokit/Kernel/IOInterruptEventSource.cpp?ds=sidebyside diff --git a/iokit/Kernel/IOInterruptEventSource.cpp b/iokit/Kernel/IOInterruptEventSource.cpp index a6b0034f4..bda259692 100644 --- a/iokit/Kernel/IOInterruptEventSource.cpp +++ b/iokit/Kernel/IOInterruptEventSource.cpp @@ -72,9 +72,9 @@ OSMetaClassDefineReservedUnused(IOInterruptEventSource, 6); OSMetaClassDefineReservedUnused(IOInterruptEventSource, 7); bool IOInterruptEventSource::init(OSObject *inOwner, - Action inAction = 0, - IOService *inProvider = 0, - int inIntIndex = 0) + Action inAction, + IOService *inProvider, + int inIntIndex) { bool res = true; @@ -97,12 +97,12 @@ bool IOInterruptEventSource::init(OSObject *inOwner, autoDisable = (intType == kIOInterruptTypeLevel); if (autoDisable) { - intHandler = (IOInterruptAction) - &IOInterruptEventSource::disableInterruptOccurred; + intHandler = OSMemberFunctionCast(IOInterruptAction, + this, &IOInterruptEventSource::disableInterruptOccurred); } else - intHandler = (IOInterruptAction) - &IOInterruptEventSource::normalInterruptOccurred; + intHandler = OSMemberFunctionCast(IOInterruptAction, + this, &IOInterruptEventSource::normalInterruptOccurred); res = (kIOReturnSuccess == inProvider->registerInterrupt (inIntIndex, this, intHandler)); @@ -123,7 +123,7 @@ IOInterruptEventSource::interruptEventSource(OSObject *inOwner, IOInterruptEventSource *me = new IOInterruptEventSource; if (me && !me->init(inOwner, inAction, inProvider, inIntIndex)) { - me->free(); + me->release(); return 0; }