serial: move delta_msr_wait into the tty_port
This is used by various drivers not just serial and can be extracted as commonality Signed-off-by: Alan Cox <alan@linux.intel.com>
Este commit está contenido en:
@@ -23,6 +23,7 @@ void tty_port_init(struct tty_port *port)
|
||||
memset(port, 0, sizeof(*port));
|
||||
init_waitqueue_head(&port->open_wait);
|
||||
init_waitqueue_head(&port->close_wait);
|
||||
init_waitqueue_head(&port->delta_msr_wait);
|
||||
mutex_init(&port->mutex);
|
||||
spin_lock_init(&port->lock);
|
||||
port->close_delay = (50 * HZ) / 100;
|
||||
@@ -124,6 +125,7 @@ void tty_port_hangup(struct tty_port *port)
|
||||
port->tty = NULL;
|
||||
spin_unlock_irqrestore(&port->lock, flags);
|
||||
wake_up_interruptible(&port->open_wait);
|
||||
wake_up_interruptible(&port->delta_msr_wait);
|
||||
tty_port_shutdown(port);
|
||||
}
|
||||
EXPORT_SYMBOL(tty_port_hangup);
|
||||
|
Referencia en una nueva incidencia
Block a user