/* Associate the port and tty pair. Manages any internal refcounts. Pass NULL to deassociate a port  */
void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty)
/* Associate the port and tty pair. Manages any internal refcounts. Pass NULL to deassociate a port  */
void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty)
{
	unsigned long flags;
	spin_lock_irqsave(&port->lock, flags);
	if (port->tty)
		tty_kref_put(port->tty);
	port->tty = tty_kref_get(tty);
	spin_unlock_irqrestore(&port->lock, flags);
}