aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/sllin/files/0005-Fix-build-with-5.13-kernel.patch
blob: 5114708109c2bcb66b806fda126d0745eb26f817 (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
Remove TTY_LDISC_MAGIC usage

The 5.13 kernel removed the .magic field from tty_ldisc_ops and
the associated TTY_LDISC_MAGIC #define, so remove their use when
building for 5.13 or newer. 

Upstream-Status: Inappropriate [no upstream]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>

---
diff --git a/sllin/sllin.c b/sllin/sllin.c
index 92c52ad..904cff9 100644
--- a/sllin/sllin.c
+++ b/sllin/sllin.c
@@ -1619,7 +1619,9 @@ static int sllin_ioctl(struct tty_struct *tty, struct file *file,
 
 static struct tty_ldisc_ops sll_ldisc = {
 	.owner		= THIS_MODULE,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
 	.magic		= TTY_LDISC_MAGIC,
+#endif
 	.name		= "sllin",
 	.open		= sllin_open,
 	.close		= sllin_close,