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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
|
diff -rbu dahdi-linux-3.1.0.o/drivers/dahdi/dahdi-base.c dahdi-linux-3.1.0/drivers/dahdi/dahdi-base.c
--- dahdi-linux-3.1.0.o/drivers/dahdi/dahdi-base.c 2019-10-03 16:48:09.000000000 +0200
+++ dahdi-linux-3.1.0/drivers/dahdi/dahdi-base.c 2020-04-06 14:26:55.512984750 +0200
@@ -1015,6 +1015,7 @@
return single_open(file, dahdi_seq_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations dahdi_proc_ops = {
.owner = THIS_MODULE,
.open = dahdi_proc_open,
@@ -1022,6 +1023,14 @@
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static const struct proc_ops dahdi_proc_ops = {
+ .proc_open = dahdi_proc_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#endif
diff -rbu dahdi-linux-3.1.0.o/drivers/dahdi/dahdi_dynamic_ethmf.c dahdi-linux-3.1.0/drivers/dahdi/dahdi_dynamic_ethmf.c
--- dahdi-linux-3.1.0.o/drivers/dahdi/dahdi_dynamic_ethmf.c 2019-10-03 16:48:09.000000000 +0200
+++ dahdi-linux-3.1.0/drivers/dahdi/dahdi_dynamic_ethmf.c 2020-04-06 15:19:32.543087702 +0200
@@ -733,12 +733,21 @@
return single_open(file, ztdethmf_proc_show, NULL);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations ztdethmf_proc_fops = {
.open = ztdethmf_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
+#else
+static const struct proc_ops ztdethmf_proc_fops = {
+ .proc_open = ztdethmf_proc_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = seq_release,
+};
+#endif
#endif
static int __init ztdethmf_init(void)
diff -rbu dahdi-linux-3.1.0.o/drivers/dahdi/xpp/card_bri.c dahdi-linux-3.1.0/drivers/dahdi/xpp/card_bri.c
--- dahdi-linux-3.1.0.o/drivers/dahdi/xpp/card_bri.c 2019-10-03 16:48:09.000000000 +0200
+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_bri.c 2020-04-06 15:28:49.453211420 +0200
@@ -153,7 +153,11 @@
static bool bri_packet_is_valid(xpacket_t *pack);
static void bri_packet_dump(const char *msg, xpacket_t *pack);
#ifdef CONFIG_PROC_FS
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_bri_info_ops;
+#else
+static const struct proc_ops proc_bri_info_ops;
+#endif
#endif
static int bri_spanconfig(struct file *file, struct dahdi_span *span,
struct dahdi_lineconfig *lc);
@@ -1740,6 +1744,7 @@
return single_open(file, proc_bri_info_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_bri_info_ops = {
.owner = THIS_MODULE,
.open = proc_bri_info_open,
@@ -1747,6 +1752,14 @@
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static const struct proc_ops proc_bri_info_ops = {
+ .proc_open = proc_bri_info_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#endif
static int bri_xpd_probe(struct device *dev)
diff -rbu dahdi-linux-3.1.0.o/drivers/dahdi/xpp/card_fxo.c dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxo.c
--- dahdi-linux-3.1.0.o/drivers/dahdi/xpp/card_fxo.c 2019-10-03 16:48:09.000000000 +0200
+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxo.c 2020-04-06 15:33:42.113198524 +0200
@@ -107,10 +107,17 @@
static bool fxo_packet_is_valid(xpacket_t *pack);
static void fxo_packet_dump(const char *msg, xpacket_t *pack);
#ifdef CONFIG_PROC_FS
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_fxo_info_ops;
#ifdef WITH_METERING
static const struct file_operations proc_xpd_metering_ops;
#endif
+#else
+static const struct proc_ops proc_fxo_info_ops;
+#ifdef WITH_METERING
+static const struct proc_ops proc_xpd_metering_ops;
+#endif
+#endif
#endif
static void dahdi_report_battery(xpd_t *xpd, lineno_t chan);
static void report_polarity_reversal(xpd_t *xpd, xportno_t portno, char *msg);
@@ -1484,6 +1491,7 @@
return single_open(file, proc_fxo_info_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_fxo_info_ops = {
.owner = THIS_MODULE,
.open = proc_fxo_info_open,
@@ -1491,6 +1499,14 @@
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static const struct proc_ops proc_fxo_info_ops = {
+ .proc_open = proc_fxo_info_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#ifdef WITH_METERING
static int proc_xpd_metering_show(struct seq_file *sfile, void *not_used)
@@ -1521,6 +1537,7 @@
return single_open(file, proc_xpd_metering_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_xpd_metering_ops = {
.owner = THIS_MODULE,
.open = proc_xpd_metering_open,
@@ -1528,7 +1545,14 @@
.llseek = seq_lseek,
.release = single_release,
};
-
+#else
+static const struct file_operations proc_xpd_metering_ops = {
+ .proc_open = proc_xpd_metering_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#endif
#endif
diff -rbu dahdi-linux-3.1.0.o/drivers/dahdi/xpp/card_fxs.c dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxs.c
--- dahdi-linux-3.1.0.o/drivers/dahdi/xpp/card_fxs.c 2019-10-03 16:48:09.000000000 +0200
+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxs.c 2020-04-06 15:26:55.363172030 +0200
@@ -160,10 +160,17 @@
static bool fxs_packet_is_valid(xpacket_t *pack);
static void fxs_packet_dump(const char *msg, xpacket_t *pack);
#ifdef CONFIG_PROC_FS
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_fxs_info_ops;
#ifdef WITH_METERING
static const struct file_operations proc_xpd_metering_ops;
#endif
+#else
+static const struct proc_ops proc_fxs_info_ops;
+#ifdef WITH_METERING
+static const struct proc_ops proc_xpd_metering_ops;
+#endif
+#endif
#endif
static void start_stop_vm_led(xbus_t *xbus, xpd_t *xpd, lineno_t pos);
@@ -2115,6 +2122,7 @@
return single_open(file, proc_fxs_info_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_fxs_info_ops = {
.owner = THIS_MODULE,
.open = proc_fxs_info_open,
@@ -2122,6 +2130,14 @@
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static const struct proc_ops proc_fxs_info_ops = {
+ .proc_open = proc_fxs_info_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#ifdef WITH_METERING
static ssize_t proc_xpd_metering_write(struct file *file,
@@ -2165,12 +2181,20 @@
file->private_data = PDE_DATA(inode);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_xpd_metering_ops = {
.owner = THIS_MODULE,
.open = proc_xpd_metering_open,
.write = proc_xpd_metering_write,
.release = single_release,
};
+#else
+static const struct poc_ops proc_xpd_metering_ops = {
+ .proc_open = proc_xpd_metering_open,
+ .proc_write = proc_xpd_metering_write,
+ .proc_release = single_release,
+};
+#endif
#endif
#endif
diff -rbu dahdi-linux-3.1.0.o/drivers/dahdi/xpp/xbus-core.c dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c
--- dahdi-linux-3.1.0.o/drivers/dahdi/xpp/xbus-core.c 2019-10-03 16:48:09.000000000 +0200
+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c 2020-04-06 15:20:52.413097618 +0200
@@ -50,7 +50,11 @@
#ifdef PROTOCOL_DEBUG
#ifdef CONFIG_PROC_FS
#define PROC_XBUS_COMMAND "command"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_xbus_command_ops;
+#else
+static const struct proc_ops proc_xbus_command_ops;
+#endif
#endif
#endif
@@ -65,7 +69,11 @@
"Register devices automatically (1) or not (0). UNUSED.");
#ifdef CONFIG_PROC_FS
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations xbus_read_proc_ops;
+#else
+static const struct proc_ops xbus_read_proc_ops;
+#endif
#endif
static void transport_init(xbus_t *xbus, struct xbus_ops *ops,
ushort max_send_size,
@@ -1828,6 +1836,7 @@
return single_open(file, xbus_proc_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations xbus_read_proc_ops = {
.owner = THIS_MODULE,
.open = xbus_read_proc_open,
@@ -1835,6 +1844,14 @@
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static const struct proc_ops xbus_read_proc_ops = {
+ .proc_open = xbus_read_proc_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#ifdef PROTOCOL_DEBUG
static ssize_t proc_xbus_command_write(struct file *file,
@@ -1927,11 +1944,18 @@
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations proc_xbus_command_ops = {
.owner = THIS_MODULE,
.open = proc_xbus_command_open,
.write = proc_xbus_command_write,
};
+#else
+static const struct proc_ops proc_xbus_command_ops = {
+ .proc_open = proc_xbus_command_open,
+ .proc_write = proc_xbus_command_write,
+};
+#endif
#endif
static int xpp_proc_read_show(struct seq_file *sfile, void *data)
@@ -1961,6 +1985,7 @@
return single_open(file, xpp_proc_read_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations xpp_proc_read_ops = {
.owner = THIS_MODULE,
.open = xpp_proc_read_open,
@@ -1968,6 +1993,14 @@
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static const struct proc_ops xpp_proc_read_ops = {
+ .proc_open = xpp_proc_read_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#endif
diff -rbu dahdi-linux-3.1.0.o/drivers/dahdi/xpp/xpp_dahdi.c dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_dahdi.c
--- dahdi-linux-3.1.0.o/drivers/dahdi/xpp/xpp_dahdi.c 2019-10-03 16:48:09.000000000 +0200
+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_dahdi.c 2020-04-06 15:26:17.603158828 +0200
@@ -103,7 +103,11 @@
}
#ifdef CONFIG_PROC_FS
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations xpd_read_proc_ops;
+#else
+static const struct proc_ops xpd_read_proc_ops;
+#endif
#endif
/*------------------------- XPD Management -------------------------*/
@@ -392,6 +396,7 @@
return single_open(file, xpd_read_proc_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations xpd_read_proc_ops = {
.owner = THIS_MODULE,
.open = xpd_read_proc_open,
@@ -399,6 +404,14 @@
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static const struct proc_ops xpd_read_proc_ops = {
+ .proc_open = xpd_read_proc_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#endif
diff -rbu dahdi-linux-3.1.0.o/drivers/dahdi/xpp/xpp_usb.c dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c
--- dahdi-linux-3.1.0.o/drivers/dahdi/xpp/xpp_usb.c 2020-04-06 14:09:11.512683578 +0200
+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c 2020-04-06 15:23:07.713114350 +0200
@@ -228,7 +228,11 @@
const struct usb_device_id *id);
static void xusb_disconnect(struct usb_interface *interface);
#ifdef CONFIG_PROC_FS
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations xusb_read_proc_ops;
+#else
+static const struct proc_ops xusb_read_proc_ops;
+#endif
#endif
/*------------------------------------------------------------------*/
@@ -1108,6 +1112,7 @@
return single_open(file, xusb_read_proc_show, PDE_DATA(inode));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
static const struct file_operations xusb_read_proc_ops = {
.owner = THIS_MODULE,
.open = xusb_read_proc_open,
@@ -1115,8 +1120,14 @@
.llseek = seq_lseek,
.release = single_release,
};
-
-
+#else
+static const struct proc_ops xusb_read_proc_ops = {
+ .proc_open = xusb_read_proc_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
#endif
MODULE_DESCRIPTION("XPP USB Transport Driver");
|