Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc2aaabf authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

tty: Remove tty_port::close_wait



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: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b140dfe6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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);

+0 −1
Original line number Diff line number Diff line
@@ -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);
}

+0 −1
Original line number Diff line number Diff line
@@ -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 */
+0 −1
Original line number Diff line number Diff line
@@ -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);

+0 −2
Original line number Diff line number Diff line
@@ -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);
Loading