return false;
}
- if (inProvider == 0) {
+ if (inProvider == NULL) {
return false;
}
dmaNotificationAction = inNotification;
dmaController = IODMAController::getController(dmaProvider, inDMAIndex);
- if (dmaController == 0) {
+ if (dmaController == NULL) {
return false;
}
dmaController->retain();
if (dmaES && !dmaES->init(inOwner, inProvider, inCompletion, inNotification, inDMAIndex)) {
dmaES->release();
- return 0;
+ return NULL;
}
return dmaES;
{
IOReturn result;
- if ((dmaController == 0) || (dmaIndex == 0xFFFFFFFF)) {
+ if ((dmaController == NULL) || (dmaIndex == 0xFFFFFFFF)) {
return kIOReturnError;
}
return kIOReturnBusy;
}
- if (dmaCompletionAction == 0) {
+ if (dmaCompletionAction == NULL) {
dmaSynchBusy = true;
}
IOReturn
IODMAEventSource::stopDMACommand(bool flush, uint64_t timeout)
{
- if ((dmaController == 0) || (dmaIndex == 0xFFFFFFFF)) {
+ if ((dmaController == NULL) || (dmaIndex == 0xFFFFFFFF)) {
return kIOReturnError;
}
IOReturn
IODMAEventSource::queryDMACommand(IODMACommand **dmaCommand, IOByteCount *transferCount, bool waitForIdle)
{
- if ((dmaController == 0) || (dmaIndex == 0xFFFFFFFF)) {
+ if ((dmaController == NULL) || (dmaIndex == 0xFFFFFFFF)) {
return kIOReturnError;
}
IOByteCount
IODMAEventSource::getFIFODepth(IODirection direction)
{
- if ((dmaController == 0) || (dmaIndex == 0xFFFFFFFF)) {
+ if ((dmaController == NULL) || (dmaIndex == 0xFFFFFFFF)) {
return 0;
}
IOReturn
IODMAEventSource::setFIFODepth(IOByteCount depth)
{
- if ((dmaController == 0) || (dmaIndex == 0xFFFFFFFF)) {
+ if ((dmaController == NULL) || (dmaIndex == 0xFFFFFFFF)) {
return kIOReturnError;
}
IOByteCount
IODMAEventSource::validFIFODepth(IOByteCount depth, IODirection direction)
{
- if ((dmaController == 0) || (dmaIndex == 0xFFFFFFFF)) {
+ if ((dmaController == NULL) || (dmaIndex == 0xFFFFFFFF)) {
return kIOReturnError;
}
IOReturn
IODMAEventSource::setFrameSize(UInt8 byteCount)
{
- if ((dmaController == 0) || (dmaIndex == 0xFFFFFFFF)) {
+ if ((dmaController == NULL) || (dmaIndex == 0xFFFFFFFF)) {
return kIOReturnError;
}
void
IODMAEventSource::completeDMACommand(IODMACommand *dmaCommand)
{
- if (dmaCompletionAction != 0) {
+ if (dmaCompletionAction != NULL) {
IOSimpleLockLock(dmaCommandsCompletedLock);
queue_enter(&dmaCommandsCompleted, dmaCommand, IODMACommand *, fCommandChain);
IOSimpleLockUnlock(dmaCommandsCompletedLock);
dmaCommand->reserved->fActualByteCount = actualByteCount;
dmaCommand->reserved->fTimeStamp = timeStamp;
- if (dmaNotificationAction != 0) {
+ if (dmaNotificationAction != NULL) {
(*dmaNotificationAction)(owner, this, dmaCommand, status, actualByteCount, timeStamp);
}
}