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>
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index 549bd0f..c767e30 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -23,6 +23,7 @@
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 @@
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);