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;
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));
IOInterruptEventSource *me = new IOInterruptEventSource;
if (me && !me->init(inOwner, inAction, inProvider, inIntIndex)) {
- me->free();
+ me->release();
return 0;
}