]> git.pld-linux.org Git - packages/dahdi-linux.git/commitdiff
- fix building kernel modules for linux 5.6 auto/th/dahdi-linux-3.1.0-3
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 6 Apr 2020 20:54:04 +0000 (22:54 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 6 Apr 2020 20:54:04 +0000 (22:54 +0200)
- rel 3

dahdi-linux.spec
kernel-5.6.patch [new file with mode: 0644]

index c6699c07114189428d03bf72128bc718dea2f0da..44286b27007806f485fb03a242ad03445eeef9e7 100644 (file)
@@ -35,7 +35,7 @@ exit 1
 %define                _enable_debug_packages  0
 %endif
 
-%define                rel     2
+%define                rel     3
 %define                pname   dahdi-linux
 %define                FIRMWARE_URL http://downloads.digium.com/pub/telephony/firmware/releases
 Summary:       DAHDI telephony device support
@@ -60,6 +60,7 @@ Source7:      %{FIRMWARE_URL}/dahdi-fw-hx8-2.06.tar.gz
 Patch0:                kernel-4.14.patch
 Patch1:                kernel-5.4.patch
 Patch2:                math64.patch
+Patch3:                kernel-5.6.patch
 URL:           http://www.asterisk.org/
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
 BuildRequires: perl-base
@@ -162,6 +163,7 @@ cd ../..\
 %ifarch %{ix86}
 %patch2 -p1
 %endif
+%patch3 -p1
 
 for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7}; do
        ln -s $a drivers/dahdi/firmware
diff --git a/kernel-5.6.patch b/kernel-5.6.patch
new file mode 100644 (file)
index 0000000..b031b77
--- /dev/null
@@ -0,0 +1,326 @@
+--- dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c.orig       2019-10-03 16:48:09.000000000 +0200
++++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c    2020-04-06 22:34:10.096719691 +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
+--- dahdi-linux-3.1.0/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 22:36:24.210054963 +0200
+@@ -160,7 +160,11 @@
+ 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;
++#else
++static const struct proc_ops proc_fxs_info_ops;
++#endif
+ #ifdef        WITH_METERING
+ static const struct file_operations proc_xpd_metering_ops;
+ #endif
+@@ -2115,6 +2119,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 +2127,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,
+--- dahdi-linux-3.1.0/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 22:38:26.426723392 +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
+--- dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c~     2019-10-03 16:48:09.000000000 +0200
++++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c      2020-04-06 22:40:28.523391828 +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,7 +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
+--- dahdi-linux-3.1.0/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 22:42:48.636727124 +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)
+--- dahdi-linux-3.1.0/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 22:44:33.106728622 +0200
+@@ -107,7 +107,11 @@
+ 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;
++#else
++static const struct proc_ops proc_fxo_info_ops;
++#endif
+ #ifdef        WITH_METERING
+ static const struct file_operations proc_xpd_metering_ops;
+ #endif
+@@ -1484,6 +1488,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 +1496,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)
+--- dahdi-linux-3.1.0/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 22:48:13.696731750 +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)
+--- dahdi-linux-3.1.0/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 22:49:56.900066527 +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
This page took 0.147511 seconds and 4 git commands to generate.