summarylogtreecommitdiffstats
path: root/0003-kernel-5.12-tty-low_latency.patch
blob: 1e13c749347ba377d2b314c7c29fdce22980a285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/driver/serial_core.c	2021-06-29 16:54:33.109516866 -0400
+++ b/driver/serial_core.c	2021-06-29 16:55:57.331119360 -0400
@@ -911,11 +911,13 @@ static int uart_set_info(struct tty_stru
 	uport->custom_divisor   = new_info->custom_divisor;
 	port->close_delay     = close_delay;
 	port->closing_wait    = closing_wait;
 	if (new_info->xmit_fifo_size)
 		uport->fifosize = new_info->xmit_fifo_size;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
 	port->low_latency = (uport->flags & UPF_LOW_LATENCY) ? 1 : 0;
+#endif
 
  check_and_exit:
 	retval = 0;
 	if (uport->type == PORT_UNKNOWN)
 		goto exit;
@@ -1749,12 +1751,14 @@ static int uart_open(struct tty_struct *
 	 * uart_close() will decrement the driver module use count.
 	 * Any failures from here onwards should not touch the count.
 	 */
 	tty->driver_data = state;
 	state->uart_port->state = state;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
 	state->port.low_latency =
 		(state->uart_port->flags & UPF_LOW_LATENCY) ? 1 : 0;
+#endif
 	tty_port_tty_set(port, tty);
 
 	/*
 	 * If the port is in the middle of closing, bail out now.
 	 */