sllin: add patches for newer kernels
[AGL/meta-agl-demo.git] / recipes-kernel / sllin / files / 0005-Fix-build-with-5.13-kernel.patch
1 Remove TTY_LDISC_MAGIC usage
2
3 The 5.13 kernel removed the .magic field from tty_ldisc_ops and
4 the associated TTY_LDISC_MAGIC #define, so remove their use when
5 building for 5.13 or newer. 
6
7 Upstream-Status: Inappropriate [no upstream]
8 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
9
10 ---
11 diff --git a/sllin/sllin.c b/sllin/sllin.c
12 index 92c52ad..904cff9 100644
13 --- a/sllin/sllin.c
14 +++ b/sllin/sllin.c
15 @@ -1619,7 +1619,9 @@ static int sllin_ioctl(struct tty_struct *tty, struct file *file,
16  
17  static struct tty_ldisc_ops sll_ldisc = {
18         .owner          = THIS_MODULE,
19 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
20         .magic          = TTY_LDISC_MAGIC,
21 +#endif
22         .name           = "sllin",
23         .open           = sllin_open,
24         .close          = sllin_close,