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

Commit d6c53c0e authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

TTY: move low_latency to tty_port



One point is to have less places where we actually need tty pointer.
The other is that low_latency is bound to buffer processing and
buffers are now in tty_port. So it makes sense to move low_latency to
tty_port too.

Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 05c7cd39
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
	struct tty_port *port = &info->port;

	tty->driver_data = info;
	tty->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
	port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;

	/*
	 * figure out which console to use (should be one already)
+3 −3
Original line number Diff line number Diff line
@@ -537,7 +537,7 @@ static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port)
	count = CIRC_CNT(port->rx_inp, port->rx_outp, MNSC_BUFFER_SIZE);
	count = tty_buffer_request_room(port, count);
	if (count == 0) {
		if (!tty->low_latency)
		if (!port->low_latency)
			tty_flip_buffer_push(tty);
		return;
	}
@@ -546,7 +546,7 @@ static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port)
	/* pull chars out of the hat */
	ix = ACCESS_ONCE(port->rx_outp);
	if (CIRC_CNT(port->rx_inp, ix, MNSC_BUFFER_SIZE) == 0) {
		if (push && !tty->low_latency)
		if (push && !port->low_latency)
			tty_flip_buffer_push(tty);
		return;
	}
@@ -678,7 +678,7 @@ static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port)

	count--;
	if (count <= 0) {
		if (!tty->low_latency)
		if (!port->low_latency)
			tty_flip_buffer_push(tty);
		return;
	}
+1 −1
Original line number Diff line number Diff line
@@ -2522,7 +2522,7 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
		goto cleanup;
	}

	tty->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
	port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;

	spin_lock_irqsave(&info->netlock, flags);
	if (info->netcount) {
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ static int if_open(struct tty_struct *tty, struct file *filp)

	if (cs->port.count == 1) {
		tty_port_tty_set(&cs->port, tty);
		tty->low_latency = 1;
		cs->port.low_latency = 1;
	}

	mutex_unlock(&cs->mutex);
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ static inline void update_tty_status(struct ser_device *ser)
		ser->tty->hw_stopped << 4 |
		ser->tty->flow_stopped << 3 |
		ser->tty->packet << 2 |
		ser->tty->low_latency << 1 |
		ser->tty->port->low_latency << 1 |
		ser->tty->warned;
}
static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty)
Loading