File: 0002-xtrx.c-fix-build-error-with-kernel-6.1.patch

package info (click to toggle)
xtrx-dkms 0.0.1%2Bgit20190320.5ae3a3e-3.7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 376 kB
  • sloc: ansic: 7,314; xml: 23; makefile: 21
file content (28 lines) | stat: -rw-r--r-- 1,011 bytes parent folder | download
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
Description: xtrx.c: fix build error with kernel 6.1
 uart_ops.set_termios type changes a little in kernel 6.1. Thus
 we need to change xtrx_uart_set_termios() third parameter as a
 const pointer when building with kernel version >= 6.1
Forwarded: https://github.com/xtrx-sdr/xtrx_linux_pcie_drv/pull/15
Author: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Bug-Debian: http://bugs.debian.org/1029135
Last-Update: 2023-01-21
Index: xtrx-dkms-0.0.1+git20190320.5ae3a3e/xtrx.c
===================================================================
--- xtrx-dkms-0.0.1+git20190320.5ae3a3e.orig/xtrx.c
+++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/xtrx.c
@@ -361,8 +361,13 @@ static void xtrx_uart_shutdown(struct ua
 }
 
 static void xtrx_uart_set_termios(struct uart_port *port,
-				 struct ktermios *new,
-				 struct ktermios *old)
+				  struct ktermios *new,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
+				  struct ktermios *old
+#else
+				  const struct ktermios *old
+#endif
+	)
 {
 	unsigned long flags;