summaryrefslogtreecommitdiffstats
path: root/system/dahdi-complete/patches/07-dahdi-3.1.0-r1-kernel5.6.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/dahdi-complete/patches/07-dahdi-3.1.0-r1-kernel5.6.patch')
-rw-r--r--system/dahdi-complete/patches/07-dahdi-3.1.0-r1-kernel5.6.patch392
1 files changed, 392 insertions, 0 deletions
diff --git a/system/dahdi-complete/patches/07-dahdi-3.1.0-r1-kernel5.6.patch b/system/dahdi-complete/patches/07-dahdi-3.1.0-r1-kernel5.6.patch
new file mode 100644
index 0000000000..64df8ec485
--- /dev/null
+++ b/system/dahdi-complete/patches/07-dahdi-3.1.0-r1-kernel5.6.patch
@@ -0,0 +1,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");