static irqreturn_t rs_interrupt_single(int irq, void *dev_id)
{
struct serial_state *info = dev_id;
- struct tty_struct *tty = info->port.tty;
+ struct tty_struct *tty = tty_port_tty_get(&info->port);
if (!tty) {
printk(KERN_INFO "simrs_interrupt_single: info|tty=0 info=%p problem\n", info);
* on inbound traffic
*/
receive_chars(tty);
+ tty_kref_put(tty);
return IRQ_HANDLED;
}
*/
shutdown(tty, info);
rs_flush_buffer(tty);
- port->tty = NULL;
tty_port_close_end(port, tty);
+ tty_port_tty_set(port, NULL);
}
/*
port->count = 0;
port->flags &= ~ASYNC_NORMAL_ACTIVE;
- port->tty = NULL;
+ tty_port_tty_set(port, NULL);
wake_up_interruptible(&port->open_wait);
}
int retval;
port->count++;
- port->tty = tty;
+ tty_port_tty_set(port, tty);
tty->driver_data = info;
tty->port = port;