summarylogtreecommitdiffstats
path: root/0005-kernel-6.0-set_termios-const-ktermios.patch
blob: 997bad0c935ae3a826c73c08910a02acaccc1c5e (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
35
diff -pNaru5 a/driver/snx_serial.c b/driver/snx_serial.c
--- a/driver/snx_serial.c	2023-01-29 14:18:17.928405051 -0500
+++ b/driver/snx_serial.c	2023-01-29 14:20:06.654184113 -0500
@@ -116,11 +116,15 @@ static int      snx_ser_ioctl(struct tty
 #endif
 
 static void     snx_ser_hangup(struct tty_struct *);
 unsigned int    snx_ser_get_divisor(struct snx_ser_port *, unsigned int);
 extern void     snx_ser_change_speed(struct snx_ser_state *, struct SNXTERMIOS *);
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
+static void     snx_ser_set_termios(struct tty_struct *, const struct SNXTERMIOS *);
+#else
 static void     snx_ser_set_termios(struct tty_struct *, struct SNXTERMIOS *);
+#endif
 
 static void     snx_ser_update_timeout(struct snx_ser_port *, unsigned int, unsigned int);
 static struct   snx_ser_state *snx_ser_get(struct snx_ser_driver *, int);
 static int      snx_ser_block_til_ready(struct file *, struct snx_ser_state *);
 static void     snx_ser_wait_until_sent(struct tty_struct *, int);
@@ -3070,11 +3074,15 @@ extern void snx_ser_change_speed(struct
 
 	sunix_ser_set_termios(port, termios, old_termios);
 }
 
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
+static void snx_ser_set_termios(struct tty_struct *tty, const struct SNXTERMIOS *old_termios)
+#else
 static void snx_ser_set_termios(struct tty_struct *tty, struct SNXTERMIOS *old_termios)
+#endif
 {
 	struct snx_ser_state *state = NULL;
 	unsigned long flags;
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0))