if ((tty=card->tty)==NULL)
return;
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup){
- (tty->ldisc.write_wakeup)(tty);
- }
- wake_up_interruptible(&tty->write_wait);
+ tty_wakeup(tty);
#if defined(SERIAL_HAVE_POLL_WAIT)
wake_up_interruptible(&tty->poll_wait);
#endif
char fp=0;
struct tty_struct *tty;
int i;
+ struct tty_ldisc *ld;
if (!card->tty_open){
dbg_printk(KERN_INFO "%s: TTY not open during receive\n",
len -= offset;
}
sdla_peek(&card->hw, addr, card->tty_rx+offset, len);
- if (tty->ldisc.receive_buf){
- tty->ldisc.receive_buf(tty,card->tty_rx,&fp,olen);
+ ld = tty_ldisc_ref(tty);
+ if (ld) {
+ if (ld->receive_buf)
+ ld->receive_buf(tty,card->tty_rx,&fp,olen);
+ tty_ldisc_deref(ld);
}else{
if (net_ratelimit()){
printk(KERN_INFO
if (!tty)
return;
- wake_up_interruptible(&tty->write_wait);
#if defined(SERIAL_HAVE_POLL_WAIT)
wake_up_interruptible(&tty->poll_wait);
#endif
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
-
+ tty_wakeup(tty);
return;
}