#define DIGIINFOMAJOR 35 /* For Digi specific ioctl */
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAXCARDS 7
#define epcaassert(x, msg) if (!(x)) epca_error(__LINE__, msg)
if (tty->driver->flush_buffer)
tty->driver->flush_buffer(tty);
- if (tty->ldisc.flush_buffer)
- tty->ldisc.flush_buffer(tty);
-
+ tty_ldisc_flush(tty);
shutdown(ch);
tty->closing = 0;
ch->event = 0;
cli();
if (tty->driver->flush_buffer)
tty->driver->flush_buffer(tty);
-
- if (tty->ldisc.flush_buffer)
- tty->ldisc.flush_buffer(tty);
-
+ tty_ldisc_flush(tty);
shutdown(ch);
ch->tty = NULL;
bytesAvailable will then take on this newly calculated value.
---------------------------------------------------------------------- */
- bytesAvailable = MIN(dataLen, bytesAvailable);
+ bytesAvailable = min(dataLen, bytesAvailable);
/* First we read the data in from the file system into a temp buffer */
space; reduce the amount of data to fit the space.
---------------------------------------------------------------------- */
- bytesAvailable = MIN(remain, bytesAvailable);
+ bytesAvailable = min(remain, bytesAvailable);
txwinon(ch);
while (bytesAvailable > 0)
data copy fills to the end of card buffer.
------------------------------------------------------------------- */
- dataLen = MIN(bytesAvailable, dataLen);
+ dataLen = min(bytesAvailable, dataLen);
memcpy(ch->txptr + head, buf, dataLen);
buf += dataLen;
head += dataLen;
restore_flags(flags);
wake_up_interruptible(&tty->write_wait);
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
+ tty_wakeup(tty);
} /* End pc_flush_buffer */
{ /* Begin if LOWWAIT */
ch->statusflags &= ~LOWWAIT;
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
+ tty_wakeup(tty);
wake_up_interruptible(&tty->write_wait);
} /* End if LOWWAIT */
{ /* Begin if EMPTYWAIT */
ch->statusflags &= ~EMPTYWAIT;
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
+ tty_wakeup(tty);
wake_up_interruptible(&tty->write_wait);
}
else
{
+ /* ldisc lock already held in ioctl */
if (tty->ldisc.flush_buffer)
tty->ldisc.flush_buffer(tty);
}
}
} /* End EPCA_MAGIC */
- MOD_DEC_USE_COUNT;
} /* End do_softint */
/* ------------------------------------------------------------