tty: Remove tty_port::close_wait
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 10 Oct 2015 20:00:54 +0000 (16:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Oct 2015 04:11:29 +0000 (21:11 -0700)
With the removal of tty_wait_until_sent_from_close(), tty drivers
no longer wait during open for parallel closes to complete (instead,
the tty core waits before calling the driver open() method). Thus,
the close_wait waitqueue is no longer used for waiting.

Remove struct tty_port::close_wait.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/rocket.c
drivers/tty/serial/68328serial.c
drivers/tty/serial/crisv10.c
drivers/tty/serial/serial_core.c
drivers/tty/tty_port.c
include/linux/tty.h

index 69c72d1aa62753d80a61714ebe1e91c8385abb97..802eac7e561b85f1aa43601a7a9eb94b05d3cb62 100644 (file)
@@ -1049,7 +1049,6 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
        mutex_unlock(&port->mutex);
        tty_port_tty_set(port, NULL);
 
-       wake_up_interruptible(&port->close_wait);
        complete_all(&info->close_wait);
        atomic_dec(&rp_num_ports_open);
 
index 9ba0c933307898813fab2fba2e413b9d943f9472..0140ba4aacded5ce8adf16cc7e8bfffb0fc7abd5 100644 (file)
@@ -1071,7 +1071,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
                wake_up_interruptible(&port->open_wait);
        }
        port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
-       wake_up_interruptible(&port->close_wait);
        local_irq_restore(flags);
 }
 
index 06f4fe928dcd9b28567151ce281da027e6f8f241..f13f2ebd215bc9afe2ad64ae9070b8c069967d18 100644 (file)
@@ -3655,7 +3655,6 @@ rs_close(struct tty_struct *tty, struct file * filp)
                wake_up_interruptible(&info->port.open_wait);
        }
        info->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
-       wake_up_interruptible(&info->port.close_wait);
        local_irq_restore(flags);
 
        /* port closed */
index df4271ae7414267223f293f168646b0003833920..def5199ca004d1f3b7fa70057b465871a8ef5bb5 100644 (file)
@@ -1437,7 +1437,6 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
        clear_bit(ASYNCB_CLOSING, &port->flags);
        spin_unlock_irq(&port->lock);
        wake_up_interruptible(&port->open_wait);
-       wake_up_interruptible(&port->close_wait);
 
        mutex_unlock(&port->mutex);
 
index 0e1cf0495fb9e0eb9d2f694f43aca80c8ee630d2..e04a8cfb16f764b460f5c3072820c7092f63b18e 100644 (file)
@@ -22,7 +22,6 @@ void tty_port_init(struct tty_port *port)
        memset(port, 0, sizeof(*port));
        tty_buffer_init(port);
        init_waitqueue_head(&port->open_wait);
-       init_waitqueue_head(&port->close_wait);
        init_waitqueue_head(&port->delta_msr_wait);
        mutex_init(&port->mutex);
        mutex_init(&port->buf_mutex);
@@ -520,7 +519,6 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
                wake_up_interruptible(&port->open_wait);
        }
        port->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
-       wake_up_interruptible(&port->close_wait);
        spin_unlock_irqrestore(&port->lock, flags);
 }
 EXPORT_SYMBOL(tty_port_close_end);
index 614c8224c32fd153d8179110b85a9ede781f4c23..090ce2a522626d445b695bd3cee53cfddb5a03ec 100644 (file)
@@ -227,7 +227,6 @@ struct tty_port {
        int                     blocked_open;   /* Waiting to open */
        int                     count;          /* Usage count */
        wait_queue_head_t       open_wait;      /* Open waiters */
-       wait_queue_head_t       close_wait;     /* Close waiters */
        wait_queue_head_t       delta_msr_wait; /* Modem status change */
        unsigned long           flags;          /* TTY flags ASY_*/
        unsigned char           console:1,      /* port is a console */