]>
Commit | Line | Data |
---|---|---|
22d881ca JR |
1 | --- dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c.orig 2019-10-03 16:48:09.000000000 +0200 |
2 | +++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c 2020-04-06 22:34:10.096719691 +0200 | |
3 | @@ -50,7 +50,11 @@ | |
4 | #ifdef PROTOCOL_DEBUG | |
5 | #ifdef CONFIG_PROC_FS | |
6 | #define PROC_XBUS_COMMAND "command" | |
7 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
8 | static const struct file_operations proc_xbus_command_ops; | |
9 | +#else | |
10 | +static const struct proc_ops proc_xbus_command_ops; | |
11 | +#endif | |
12 | #endif | |
13 | #endif | |
14 | ||
15 | @@ -65,7 +69,11 @@ | |
16 | "Register devices automatically (1) or not (0). UNUSED."); | |
17 | ||
18 | #ifdef CONFIG_PROC_FS | |
19 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
20 | static const struct file_operations xbus_read_proc_ops; | |
21 | +#else | |
22 | +static const struct proc_ops xbus_read_proc_ops; | |
23 | +#endif | |
24 | #endif | |
25 | static void transport_init(xbus_t *xbus, struct xbus_ops *ops, | |
26 | ushort max_send_size, | |
27 | @@ -1828,6 +1836,7 @@ | |
28 | return single_open(file, xbus_proc_show, PDE_DATA(inode)); | |
29 | } | |
30 | ||
31 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
32 | static const struct file_operations xbus_read_proc_ops = { | |
33 | .owner = THIS_MODULE, | |
34 | .open = xbus_read_proc_open, | |
35 | @@ -1835,6 +1844,14 @@ | |
36 | .llseek = seq_lseek, | |
37 | .release = single_release, | |
38 | }; | |
39 | +#else | |
40 | +static const struct proc_ops xbus_read_proc_ops = { | |
41 | + .proc_open = xbus_read_proc_open, | |
42 | + .proc_read = seq_read, | |
43 | + .proc_lseek = seq_lseek, | |
44 | + .proc_release = single_release, | |
45 | +}; | |
46 | +#endif | |
47 | ||
48 | #ifdef PROTOCOL_DEBUG | |
49 | static ssize_t proc_xbus_command_write(struct file *file, | |
50 | @@ -1927,11 +1944,18 @@ | |
51 | return 0; | |
52 | } | |
53 | ||
54 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
55 | static const struct file_operations proc_xbus_command_ops = { | |
56 | .owner = THIS_MODULE, | |
57 | .open = proc_xbus_command_open, | |
58 | .write = proc_xbus_command_write, | |
59 | }; | |
60 | +#else | |
61 | +static const struct proc_ops proc_xbus_command_ops = { | |
62 | + .proc_open = proc_xbus_command_open, | |
63 | + .proc_write = proc_xbus_command_write, | |
64 | +}; | |
65 | +#endif | |
66 | #endif | |
67 | ||
68 | static int xpp_proc_read_show(struct seq_file *sfile, void *data) | |
69 | @@ -1961,6 +1985,7 @@ | |
70 | return single_open(file, xpp_proc_read_show, PDE_DATA(inode)); | |
71 | } | |
72 | ||
73 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
74 | static const struct file_operations xpp_proc_read_ops = { | |
75 | .owner = THIS_MODULE, | |
76 | .open = xpp_proc_read_open, | |
77 | @@ -1968,6 +1993,14 @@ | |
78 | .llseek = seq_lseek, | |
79 | .release = single_release, | |
80 | }; | |
81 | +#else | |
82 | +static const struct proc_ops xpp_proc_read_ops = { | |
83 | + .proc_open = xpp_proc_read_open, | |
84 | + .proc_read = seq_read, | |
85 | + .proc_lseek = seq_lseek, | |
86 | + .proc_release = single_release, | |
87 | +}; | |
88 | +#endif | |
89 | ||
90 | #endif | |
91 | ||
92 | --- dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxs.c~ 2019-10-03 16:48:09.000000000 +0200 | |
93 | +++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxs.c 2020-04-06 22:36:24.210054963 +0200 | |
94 | @@ -160,7 +160,11 @@ | |
95 | static bool fxs_packet_is_valid(xpacket_t *pack); | |
96 | static void fxs_packet_dump(const char *msg, xpacket_t *pack); | |
97 | #ifdef CONFIG_PROC_FS | |
98 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
99 | static const struct file_operations proc_fxs_info_ops; | |
100 | +#else | |
101 | +static const struct proc_ops proc_fxs_info_ops; | |
102 | +#endif | |
103 | #ifdef WITH_METERING | |
104 | static const struct file_operations proc_xpd_metering_ops; | |
105 | #endif | |
106 | @@ -2115,6 +2119,7 @@ | |
107 | return single_open(file, proc_fxs_info_show, PDE_DATA(inode)); | |
108 | } | |
109 | ||
110 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
111 | static const struct file_operations proc_fxs_info_ops = { | |
112 | .owner = THIS_MODULE, | |
113 | .open = proc_fxs_info_open, | |
114 | @@ -2122,6 +2127,14 @@ | |
115 | .llseek = seq_lseek, | |
116 | .release = single_release, | |
117 | }; | |
118 | +#else | |
119 | +static const struct proc_ops proc_fxs_info_ops = { | |
120 | + .proc_open = proc_fxs_info_open, | |
121 | + .proc_read = seq_read, | |
122 | + .proc_lseek = seq_lseek, | |
123 | + .proc_release = single_release, | |
124 | +}; | |
125 | +#endif | |
126 | ||
127 | #ifdef WITH_METERING | |
128 | static ssize_t proc_xpd_metering_write(struct file *file, | |
129 | --- dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_dahdi.c~ 2019-10-03 16:48:09.000000000 +0200 | |
130 | +++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_dahdi.c 2020-04-06 22:38:26.426723392 +0200 | |
131 | @@ -103,7 +103,11 @@ | |
132 | } | |
133 | ||
134 | #ifdef CONFIG_PROC_FS | |
135 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
136 | static const struct file_operations xpd_read_proc_ops; | |
137 | +#else | |
138 | +static const struct proc_ops xpd_read_proc_ops; | |
139 | +#endif | |
140 | #endif | |
141 | ||
142 | /*------------------------- XPD Management -------------------------*/ | |
143 | @@ -392,6 +396,7 @@ | |
144 | return single_open(file, xpd_read_proc_show, PDE_DATA(inode)); | |
145 | } | |
146 | ||
147 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
148 | static const struct file_operations xpd_read_proc_ops = { | |
149 | .owner = THIS_MODULE, | |
150 | .open = xpd_read_proc_open, | |
151 | @@ -399,6 +404,14 @@ | |
152 | .llseek = seq_lseek, | |
153 | .release = single_release, | |
154 | }; | |
155 | +#else | |
156 | +static const struct proc_ops xpd_read_proc_ops = { | |
157 | + .proc_open = xpd_read_proc_open, | |
158 | + .proc_read = seq_read, | |
159 | + .proc_lseek = seq_lseek, | |
160 | + .proc_release = single_release, | |
161 | +}; | |
162 | +#endif | |
163 | ||
164 | #endif | |
165 | ||
166 | --- dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c~ 2019-10-03 16:48:09.000000000 +0200 | |
167 | +++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c 2020-04-06 22:40:28.523391828 +0200 | |
168 | @@ -228,7 +228,11 @@ | |
169 | const struct usb_device_id *id); | |
170 | static void xusb_disconnect(struct usb_interface *interface); | |
171 | #ifdef CONFIG_PROC_FS | |
172 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
173 | static const struct file_operations xusb_read_proc_ops; | |
174 | +#else | |
175 | +static const struct proc_ops xusb_read_proc_ops; | |
176 | +#endif | |
177 | #endif | |
178 | ||
179 | /*------------------------------------------------------------------*/ | |
180 | @@ -1108,6 +1112,7 @@ | |
181 | return single_open(file, xusb_read_proc_show, PDE_DATA(inode)); | |
182 | } | |
183 | ||
184 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
185 | static const struct file_operations xusb_read_proc_ops = { | |
186 | .owner = THIS_MODULE, | |
187 | .open = xusb_read_proc_open, | |
188 | @@ -1115,7 +1120,14 @@ | |
189 | .llseek = seq_lseek, | |
190 | .release = single_release, | |
191 | }; | |
192 | - | |
193 | +#else | |
194 | +static const struct proc_ops xusb_read_proc_ops = { | |
195 | + .proc_open = xusb_read_proc_open, | |
196 | + .proc_read = seq_read, | |
197 | + .proc_lseek = seq_lseek, | |
198 | + .proc_release = single_release, | |
199 | +}; | |
200 | +#endif | |
201 | ||
202 | #endif | |
203 | ||
204 | --- dahdi-linux-3.1.0/drivers/dahdi/xpp/card_bri.c~ 2019-10-03 16:48:09.000000000 +0200 | |
205 | +++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_bri.c 2020-04-06 22:42:48.636727124 +0200 | |
206 | @@ -153,7 +153,11 @@ | |
207 | static bool bri_packet_is_valid(xpacket_t *pack); | |
208 | static void bri_packet_dump(const char *msg, xpacket_t *pack); | |
209 | #ifdef CONFIG_PROC_FS | |
210 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
211 | static const struct file_operations proc_bri_info_ops; | |
212 | +#else | |
213 | +static const struct proc_ops proc_bri_info_ops; | |
214 | +#endif | |
215 | #endif | |
216 | static int bri_spanconfig(struct file *file, struct dahdi_span *span, | |
217 | struct dahdi_lineconfig *lc); | |
218 | @@ -1740,6 +1744,7 @@ | |
219 | return single_open(file, proc_bri_info_show, PDE_DATA(inode)); | |
220 | } | |
221 | ||
222 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
223 | static const struct file_operations proc_bri_info_ops = { | |
224 | .owner = THIS_MODULE, | |
225 | .open = proc_bri_info_open, | |
226 | @@ -1747,6 +1752,14 @@ | |
227 | .llseek = seq_lseek, | |
228 | .release = single_release, | |
229 | }; | |
230 | +#else | |
231 | +static const struct proc_ops proc_bri_info_ops = { | |
232 | + .proc_open = proc_bri_info_open, | |
233 | + .proc_read = seq_read, | |
234 | + .proc_lseek = seq_lseek, | |
235 | + .proc_release = single_release, | |
236 | +}; | |
237 | +#endif | |
238 | #endif | |
239 | ||
240 | static int bri_xpd_probe(struct device *dev) | |
241 | --- dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxo.c~ 2019-10-03 16:48:09.000000000 +0200 | |
242 | +++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxo.c 2020-04-06 22:44:33.106728622 +0200 | |
243 | @@ -107,7 +107,11 @@ | |
244 | static bool fxo_packet_is_valid(xpacket_t *pack); | |
245 | static void fxo_packet_dump(const char *msg, xpacket_t *pack); | |
246 | #ifdef CONFIG_PROC_FS | |
247 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
248 | static const struct file_operations proc_fxo_info_ops; | |
249 | +#else | |
250 | +static const struct proc_ops proc_fxo_info_ops; | |
251 | +#endif | |
252 | #ifdef WITH_METERING | |
253 | static const struct file_operations proc_xpd_metering_ops; | |
254 | #endif | |
255 | @@ -1484,6 +1488,7 @@ | |
256 | return single_open(file, proc_fxo_info_show, PDE_DATA(inode)); | |
257 | } | |
258 | ||
259 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
260 | static const struct file_operations proc_fxo_info_ops = { | |
261 | .owner = THIS_MODULE, | |
262 | .open = proc_fxo_info_open, | |
263 | @@ -1491,6 +1496,14 @@ | |
264 | .llseek = seq_lseek, | |
265 | .release = single_release, | |
266 | }; | |
267 | +#else | |
268 | +static const struct proc_ops proc_fxo_info_ops = { | |
269 | + .proc_open = proc_fxo_info_open, | |
270 | + .proc_read = seq_read, | |
271 | + .proc_lseek = seq_lseek, | |
272 | + .proc_release = single_release, | |
273 | +}; | |
274 | +#endif | |
275 | ||
276 | #ifdef WITH_METERING | |
277 | static int proc_xpd_metering_show(struct seq_file *sfile, void *not_used) | |
278 | --- dahdi-linux-3.1.0/drivers/dahdi/dahdi_dynamic_ethmf.c~ 2019-10-03 16:48:09.000000000 +0200 | |
279 | +++ dahdi-linux-3.1.0/drivers/dahdi/dahdi_dynamic_ethmf.c 2020-04-06 22:48:13.696731750 +0200 | |
280 | @@ -733,12 +733,21 @@ | |
281 | return single_open(file, ztdethmf_proc_show, NULL); | |
282 | } | |
283 | ||
284 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
285 | static const struct file_operations ztdethmf_proc_fops = { | |
286 | .open = ztdethmf_proc_open, | |
287 | .read = seq_read, | |
288 | .llseek = seq_lseek, | |
289 | .release = seq_release, | |
290 | }; | |
291 | +#else | |
292 | +static const struct proc_ops ztdethmf_proc_fops = { | |
293 | + .proc_open = ztdethmf_proc_open, | |
294 | + .proc_read = seq_read, | |
295 | + .proc_lseek = seq_lseek, | |
296 | + .proc_release = seq_release, | |
297 | +}; | |
298 | +#endif | |
299 | #endif | |
300 | ||
301 | static int __init ztdethmf_init(void) | |
302 | --- dahdi-linux-3.1.0/drivers/dahdi/dahdi-base.c~ 2019-10-03 16:48:09.000000000 +0200 | |
303 | +++ dahdi-linux-3.1.0/drivers/dahdi/dahdi-base.c 2020-04-06 22:49:56.900066527 +0200 | |
304 | @@ -1015,6 +1015,7 @@ | |
305 | return single_open(file, dahdi_seq_show, PDE_DATA(inode)); | |
306 | } | |
307 | ||
308 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) | |
309 | static const struct file_operations dahdi_proc_ops = { | |
310 | .owner = THIS_MODULE, | |
311 | .open = dahdi_proc_open, | |
312 | @@ -1022,6 +1023,14 @@ | |
313 | .llseek = seq_lseek, | |
314 | .release = single_release, | |
315 | }; | |
316 | +#else | |
317 | +static const struct proc_ops dahdi_proc_ops = { | |
318 | + .proc_open = dahdi_proc_open, | |
319 | + .proc_read = seq_read, | |
320 | + .proc_lseek = seq_lseek, | |
321 | + .proc_release = single_release, | |
322 | +}; | |
323 | +#endif | |
324 | ||
325 | #endif | |
326 |