summarylogtreecommitdiffstats
path: root/mxu11x0.c.patch
blob: 8888bee7658b9bc4df0f78956f97bae644e34638 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
85a86,90
> #if(LINUX_VERSION_CODE < KERNEL_VERSION(5,12,6))
> #define ASYNCB_FIRST_KERNEL 0
> #else
> #define ASYNCB_FIRST_KERNEL 1
> #endif
166,167c171,184
< static int mxu1_write_room(struct tty_struct *tty);
< static int mxu1_chars_in_buffer(struct tty_struct *tty);
---
> static 
> #if(LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0))
> int 
> #else
> unsigned int
> #endif
> mxu1_write_room(struct tty_struct *tty);
> static
> #if(LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0))
> int 
> #else
> unsigned int
> #endif
> mxu1_chars_in_buffer(struct tty_struct *tty);
225a243,246
> #if (LINUX_VERSION_CODE > KERNEL_VERSION(5,13,0))
> static void mxu1_get_serial_info2(struct tty_struct *tty,
> 	struct serial_struct __user *ret_arg);
> #else
227a249
> #endif
526c548
< 	.chars_in_buffer	= mxu1_chars_in_buffer,
---
> 	.chars_in_buffer= mxu1_chars_in_buffer,
1185c1207,1213
< static int mxu1_write_room(struct tty_struct *tty)
---
> static 
> #if(LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0))
> int
> #else
> unsigned int
> #endif
> mxu1_write_room(struct tty_struct *tty)
1197a1226,1227
> 
> #if(LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0))
1198a1229,1231
> #else
>         return 0;
> #endif
1213c1246,1252
< static int mxu1_chars_in_buffer(struct tty_struct *tty)
---
> static 
> #if(LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0))
> int
> #else
> unsigned int
> #endif
> mxu1_chars_in_buffer(struct tty_struct *tty)
1215c1254
< 	struct usb_serial_port *port = tty->driver_data;
---
>     struct usb_serial_port *port = tty->driver_data;
1224a1264
> #if(LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0))
1225a1266,1268
> #else
>         return 0;
> #endif
2269c2312,2318
< static int mxu1_get_serial_info2(struct tty_struct *tty,
---
> static 
> #if (LINUX_VERSION_CODE > KERNEL_VERSION(5,13,0))
> void 
> #else
> int
> #endif
> mxu1_get_serial_info2(struct tty_struct *tty,
2275,2277c2324,2332
< 	if (!ret_arg)
< 		return -EFAULT;
< 	
---
> 	if (!ret_arg) {
>         
> #if (LINUX_VERSION_CODE > KERNEL_VERSION(5,13,0))
> 		return;
> #else
>         return -EFAULT;
> #endif
> 	}
> 
2287,2288c2342,2345
< 
< 	return 0;
---
>     
> #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0))
>     return 0;
> #endif