summarylogtreecommitdiffstats
path: root/0006-kernel-5.14-unsigned-tty.patch
blob: 7e4d7ece7b2c01c2c626b2b307fc7932ac1eb90d (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
32
33
34
--- a/driver/mxusbserial/mxusb-serial.c	2021-09-14 08:57:20.885034201 -0400
+++ b/driver/mxusbserial/mxusb-serial.c	2021-09-14 08:59:10.920036474 -0400
@@ -661,11 +661,15 @@ static int serial_write (struct tty_stru
 #endif
 exit:
 	return retval;
 }
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
+static unsigned int serial_write_room (struct tty_struct *tty)
+#else
 static int serial_write_room (struct tty_struct *tty)
+#endif
 {
 	struct usb_serial_port *port = tty->driver_data;
 	int retval = -EINVAL;
 
 	if (!port)
@@ -683,11 +687,15 @@ static int serial_write_room (struct tty
 
 exit:
 	return retval;
 }
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
+static unsigned int serial_chars_in_buffer (struct tty_struct *tty)
+#else
 static int serial_chars_in_buffer (struct tty_struct *tty)
+#endif
 {
 	struct usb_serial_port *port = tty->driver_data;
 	int retval = -EINVAL;
 
 	if (!port)