tty: Remove ASYNC_CLOSING
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Jan 2016 22:51:40 +0000 (14:51 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jan 2016 22:19:12 +0000 (14:19 -0800)
The tty core no longer provides nor uses ASYNC_CLOSING; remove from
tty_port_close_start() and tty_port_close_end() as well as tty drivers
which open-code these state changes. Unfortunately, even though the
bit is masked from userspace, its inclusion in a uapi header precludes
removing the macro.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: linux-cris-kernel@axis.com
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/char/con3215.c
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
net/irda/ircomm/ircomm_tty.c

index 7d82bbcb12df4f17f9c67bab4493a31707e105d4..e7e078b3c7e6ee19e35db42666bccb23b83cdf30 100644 (file)
@@ -643,7 +643,6 @@ static void raw3215_shutdown(struct raw3215_info *raw)
        if ((raw->flags & RAW3215_WORKING) ||
            raw->queued_write != NULL ||
            raw->queued_read != NULL) {
-               raw->port.flags |= ASYNC_CLOSING;
                add_wait_queue(&raw->empty_wait, &wait);
                set_current_state(TASK_INTERRUPTIBLE);
                spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
@@ -651,7 +650,7 @@ static void raw3215_shutdown(struct raw3215_info *raw)
                spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
                remove_wait_queue(&raw->empty_wait, &wait);
                set_current_state(TASK_RUNNING);
-               raw->port.flags &= ~(ASYNC_INITIALIZED | ASYNC_CLOSING);
+               raw->port.flags &= ~ASYNC_INITIALIZED;
        }
        spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
 }
index 2ab3b6fdb67530613b34a10e02c77dda343d00ac..0b802cdd70d0938722473b166095802ac96d6e78 100644 (file)
@@ -1042,7 +1042,7 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
                }
        }
        spin_lock_irq(&port->lock);
-       info->port.flags &= ~(ASYNC_INITIALIZED | ASYNC_CLOSING | ASYNC_NORMAL_ACTIVE);
+       info->port.flags &= ~(ASYNC_INITIALIZED | ASYNC_NORMAL_ACTIVE);
        tty->closing = 0;
        spin_unlock_irq(&port->lock);
        mutex_unlock(&port->mutex);
index 4931212e5cf6ca90370bf90ce1721a42a5e32846..9587ed1242fe921dcfde2541028650e0ccc41fb5 100644 (file)
@@ -1028,7 +1028,6 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
                local_irq_restore(flags);
                return;
        }
-       port->flags |= ASYNC_CLOSING;
        /*
         * Now we wait for the transmit buffer to clear; and we notify 
         * the line discipline to only process XON/XOFF characters.
@@ -1058,7 +1057,7 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
                        msleep_interruptible(jiffies_to_msecs(port->close_delay));
                wake_up_interruptible(&port->open_wait);
        }
-       port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
+       port->flags &= ~ASYNC_NORMAL_ACTIVE;
        local_irq_restore(flags);
 }
 
index 37f10c4a3faf6d6e147d5df5be8712042cec18a4..c0172bf54a9b3d8052fc6416f6731d1a45a6c9eb 100644 (file)
@@ -3610,7 +3610,6 @@ rs_close(struct tty_struct *tty, struct file * filp)
                local_irq_restore(flags);
                return;
        }
-       info->port.flags |= ASYNC_CLOSING;
        /*
         * Now we wait for the transmit buffer to clear; and we notify
         * the line discipline to only process XON/XOFF characters.
@@ -3649,7 +3648,7 @@ rs_close(struct tty_struct *tty, struct file * filp)
                        schedule_timeout_interruptible(info->port.close_delay);
                wake_up_interruptible(&info->port.open_wait);
        }
-       info->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
+       info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
        local_irq_restore(flags);
 
        /* port closed */
index be9359fdf5c718557f9f0b21700281959d6c35c1..85829f8568e7ee932b4ee67437ad06a01e9b757d 100644 (file)
@@ -1423,7 +1423,6 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
         * Wake up anyone trying to open this port.
         */
        clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
-       clear_bit(ASYNCB_CLOSING, &port->flags);
        spin_unlock_irq(&port->lock);
        wake_up_interruptible(&port->open_wait);
 
index 0473fc7543f746817843859db11fcecc6b9debf7..dbcca30a54b1ad56db0b49f37a86d4d1a8f0710b 100644 (file)
@@ -476,7 +476,6 @@ int tty_port_close_start(struct tty_port *port,
                spin_unlock_irqrestore(&port->lock, flags);
                return 0;
        }
-       set_bit(ASYNCB_CLOSING, &port->flags);
        spin_unlock_irqrestore(&port->lock, flags);
 
        tty->closing = 1;
@@ -515,7 +514,7 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
                spin_lock_irqsave(&port->lock, flags);
                wake_up_interruptible(&port->open_wait);
        }
-       port->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
+       port->flags &= ~ASYNC_NORMAL_ACTIVE;
        spin_unlock_irqrestore(&port->lock, flags);
 }
 EXPORT_SYMBOL(tty_port_close_end);
index 1776fe5715e53855fa245e82d4a3d04526efbeee..da126ee6d2183c7509afa0fa4d238845e9fa7f36 100644 (file)
@@ -1267,10 +1267,6 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
                seq_printf(m, "%cASYNC_LOW_LATENCY", sep);
                sep = '|';
        }
-       if (self->port.flags & ASYNC_CLOSING) {
-               seq_printf(m, "%cASYNC_CLOSING", sep);
-               sep = '|';
-       }
        if (self->port.flags & ASYNC_NORMAL_ACTIVE) {
                seq_printf(m, "%cASYNC_NORMAL_ACTIVE", sep);
                sep = '|';