system/dahdi-complete: Updated for version 20201116_5c840cf.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
5c3343a21d
commit
1c55f39e4b
|
@ -12,7 +12,7 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=dahdi-complete
|
||||
VERSION=${VERSION:-3.1.0}
|
||||
VERSION=${VERSION:-20201116_5c840cf}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
@ -61,9 +61,9 @@ set -e
|
|||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $ARCHIVE_NAME-$VERSION+$VERSION
|
||||
tar zxvf $CWD/$ARCHIVE_NAME-$VERSION+$VERSION.tar.gz
|
||||
cd $ARCHIVE_NAME-$VERSION+$VERSION
|
||||
rm -rf $ARCHIVE_NAME-$VERSION
|
||||
tar xvf $CWD/$ARCHIVE_NAME-$VERSION.tar.?z
|
||||
cd $ARCHIVE_NAME-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
|
@ -75,18 +75,21 @@ sed -i -e 's/ -Werror//' tools/acinclude.m4 tools/xpp/Makefile.am
|
|||
sed -i -e 's/-Werror //' tools/Makefile.am
|
||||
|
||||
# Fix Perl install location (otherwise it installs to /usr/local/share/perl5)
|
||||
sed -i -e 's/sitelib/vendorlib/' linux/build_tools/live_dahdi tools/xpp/Makefile.am
|
||||
sed -i -e 's/sitelib/vendorlib/' linux/build_tools/live_dahdi tools/xpp/Makefile.am || exit 1
|
||||
|
||||
cd linux
|
||||
# thanks Gentoo for the patches!
|
||||
for i in $CWD/patches/* ; do patch -p1 < $i ; done
|
||||
#for i in $CWD/patches/* ; do patch -p1 < $i ; done
|
||||
make all
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cd ../tools
|
||||
# thanks debian for this patch!
|
||||
patch -p1 < $CWD/dahdi-tools-3.1.0-fno-common.patch
|
||||
./bootstrap.sh
|
||||
autoreconf -fi
|
||||
CPPFLAGS="-I$(pwd)/../linux/include" \
|
||||
CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" \
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
|
@ -101,7 +104,6 @@ CXXFLAGS="$SLKCFLAGS" \
|
|||
make
|
||||
make install DESTDIR=$PKG
|
||||
cd ..
|
||||
make config DESTDIR=$PKG
|
||||
|
||||
mkdir -p $PKG/usr/share/perl5/vendor_perl
|
||||
mv $PKG/usr/local/share/perl5/* $PKG/usr/share/perl5/vendor_perl/
|
||||
|
@ -113,7 +115,7 @@ for file in $(find . -type f); do
|
|||
mv $file "$file.new"
|
||||
done
|
||||
|
||||
install -D -m 0644 $TMP/$ARCHIVE_NAME-$VERSION+$VERSION/tools/dahdi.init $PKG/etc/rc.d/rc.dahdi.new
|
||||
install -D -m 0644 $TMP/$ARCHIVE_NAME-$VERSION/tools/dahdi.init $PKG/etc/rc.d/rc.dahdi.new
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="dahdi-complete"
|
||||
VERSION="3.1.0"
|
||||
VERSION="20201116_5c840cf"
|
||||
HOMEPAGE="http://www.asterisk.org/downloads/dahdi"
|
||||
DOWNLOAD="http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-3.1.0+3.1.0.tar.gz"
|
||||
MD5SUM="04f04b7986ad5fedd5d5602d55764015"
|
||||
DOWNLOAD="https://ponce.cc/slackware/sources/repo/dahdi-linux-complete-20201116_5c840cf.tar.xz"
|
||||
MD5SUM="b1f710e9b8c8b607722b39f58d3ae091"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
From: Jaco Kroon <jaco@uls.co.za>
|
||||
Subject: Remove unused union names that break build
|
||||
Bug: https://issues.asterisk.org/jira/browse/DAHTOOL-85
|
||||
|
||||
diff --git a/xpp/mpptalk.c b/xpp/mpptalk.c
|
||||
index fdb34f1..8fb3687 100644
|
||||
--- a/xpp/mpptalk.c
|
||||
+++ b/xpp/mpptalk.c
|
||||
@@ -237,7 +237,7 @@ union XTALK_PDATA(MPP) {
|
||||
MEMBER(MPP, TWS_PORT_GET_REPLY);
|
||||
MEMBER(MPP, TWS_PWR_GET);
|
||||
MEMBER(MPP, TWS_PWR_GET_REPLY);
|
||||
-} PACKED members;
|
||||
+} PACKED;
|
||||
|
||||
/*
|
||||
* Statuses
|
||||
diff --git a/xpp/xtalk/xtalk_raw.c b/xpp/xtalk/xtalk_raw.c
|
||||
index 49e47d5..251a502 100644
|
||||
--- a/xpp/xtalk/xtalk_raw.c
|
||||
+++ b/xpp/xtalk/xtalk_raw.c
|
||||
@@ -48,7 +48,7 @@ CMD_DEF(XTALK, ACK,
|
||||
|
||||
union XTALK_PDATA(XTALK) {
|
||||
MEMBER(XTALK, ACK);
|
||||
-} PACKED members;
|
||||
+} PACKED;
|
||||
|
||||
const struct xtalk_protocol xtalk_raw_proto = {
|
||||
.name = "XTALK-RAW",
|
||||
diff --git a/xpp/xtalk/xtalk_sync.c b/xpp/xtalk/xtalk_sync.c
|
||||
index 18a5cad..ffa79d2 100644
|
||||
--- a/xpp/xtalk/xtalk_sync.c
|
||||
+++ b/xpp/xtalk/xtalk_sync.c
|
||||
@@ -60,7 +60,7 @@ union XTALK_PDATA(XTALK) {
|
||||
MEMBER(XTALK, ACK);
|
||||
MEMBER(XTALK, PROTO_GET);
|
||||
MEMBER(XTALK, PROTO_GET_REPLY);
|
||||
-} PACKED members;
|
||||
+} PACKED;
|
||||
|
||||
const struct xtalk_protocol xtalk_sync_proto = {
|
||||
.name = "XTALK-SYNC",
|
|
@ -29,15 +29,8 @@ preserve_perms etc/rc.d/rc.dahdi.new
|
|||
|
||||
config etc/udev/rules.d/xpp.rules.new
|
||||
config etc/udev/rules.d/dahdi.rules.new
|
||||
config etc/hotplug/usb/xpp_fxloader.usermap.new
|
||||
config etc/dahdi/system.conf.new
|
||||
config etc/dahdi/assigned-spans.conf.sample.new
|
||||
config etc/dahdi/span-types.conf.sample.new
|
||||
config etc/dahdi/init.conf.new
|
||||
config etc/dahdi/modules.new
|
||||
config etc/dahdi/genconf_parameters.new
|
||||
config etc/bash_completion.d/dahdi.new
|
||||
config etc/modprobe.d/dahdi.conf.new
|
||||
config etc/modprobe.d/dahdi.blacklist.conf.new
|
||||
|
||||
chroot . /sbin/depmod -a
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff -uNr dahdi-linux-2.8.0.ORIG//Makefile dahdi-linux-2.8.0/Makefile
|
||||
--- dahdi-linux-2.8.0.ORIG//Makefile 2010-09-09 14:41:11.000000000 +0100
|
||||
+++ dahdi-linux-2.8.0/Makefile 2010-09-09 14:41:27.000000000 +0100
|
||||
@@ -139,7 +139,7 @@
|
||||
build_tools/uninstall-modules dahdi $(KVERS)
|
||||
endif
|
||||
$(KMAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=dahdi modules_install
|
||||
- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
|
||||
+# [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
|
||||
|
||||
uninstall-modules:
|
||||
ifdef DESTDIR
|
|
@ -1,34 +0,0 @@
|
|||
diff -uNr dahdi-linux-2.8.0.ORIG//Makefile dahdi-linux-2.8.0/Makefile
|
||||
--- dahdi-linux-2.8.0/Makefile.ORIG 2013-08-07 13:48:28.909267134 +0100
|
||||
+++ dahdi-linux-2.8.0/Makefile 2013-08-07 13:50:10.346268656 +0100
|
||||
@@ -71,7 +71,7 @@
|
||||
@echo "You do not appear to have the sources for the $(KVERS) kernel installed."
|
||||
@exit 1
|
||||
endif
|
||||
- $(KMAKE) modules DAHDI_BUILD_ALL=$(DAHDI_BUILD_ALL)
|
||||
+ +$(KMAKE) modules DAHDI_BUILD_ALL=$(DAHDI_BUILD_ALL)
|
||||
|
||||
include/dahdi/version.h: FORCE
|
||||
@DAHDIVERSION="${DAHDIVERSION}" build_tools/make_version_h > $@.tmp
|
||||
@@ -138,7 +138,7 @@
|
||||
fi
|
||||
build_tools/uninstall-modules dahdi $(KVERS)
|
||||
endif
|
||||
- $(KMAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=dahdi modules_install
|
||||
+ +$(KMAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=dahdi modules_install
|
||||
# [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
|
||||
|
||||
uninstall-modules:
|
||||
@@ -174,11 +174,11 @@
|
||||
|
||||
clean:
|
||||
ifneq (no,$(HAS_KSRC))
|
||||
- $(KMAKE) clean
|
||||
+ +$(KMAKE) clean
|
||||
endif
|
||||
@rm -f $(GENERATED_DOCS)
|
||||
$(MAKE) -C drivers/dahdi/firmware clean
|
||||
$(MAKE) -C $(KSRC) M='$(PWD)/drivers/dahdi/oct612x' clean
|
||||
|
||||
distclean: dist-clean
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
|
||||
index 22b9b66..eacf6e0 100644
|
||||
--- a/include/dahdi/kernel.h
|
||||
+++ b/include/dahdi/kernel.h
|
||||
@@ -59,8 +59,10 @@
|
||||
#include <linux/poll.h>
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
||||
#include <linux/pci-aspm.h>
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
|
||||
#define HAVE_NET_DEVICE_OPS
|
|
@ -1,11 +0,0 @@
|
|||
--- dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c 2020-03-28 21:34:08.471611500 +0200
|
||||
+++ dahdi-linux-3.1.0.o/drivers/dahdi/xpp/xpp_usb.c 2020-03-28 21:38:47.169161487 +0200
|
||||
@@ -882,7 +882,7 @@
|
||||
usec = 0; /* System clock jumped */
|
||||
if (usec > xusb->max_tx_delay)
|
||||
xusb->max_tx_delay = usec;
|
||||
- i = usec / USEC_BUCKET;
|
||||
+ i = div_s64(usec, USEC_BUCKET);
|
||||
if (i >= NUM_BUCKETS)
|
||||
i = NUM_BUCKETS - 1;
|
||||
xusb->usb_tx_delay[i]++;
|
File diff suppressed because it is too large
Load Diff
|
@ -1,392 +0,0 @@
|
|||
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");
|
|
@ -1,29 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index fda4c08..fab7a24 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -102,6 +102,8 @@ install-modconf:
|
||||
/sbin/update-modules ; \
|
||||
fi
|
||||
|
||||
+install-xpp-firm:
|
||||
+ $(MAKE) -C drivers/dahdi/xpp/firmwares install
|
||||
|
||||
install-firmware:
|
||||
ifeq ($(HOTPLUG_FIRMWARE),yes)
|
||||
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
|
||||
index 95ff5bc..ad899f8 100644
|
||||
--- a/drivers/dahdi/wctdm24xxp/base.c
|
||||
+++ b/drivers/dahdi/wctdm24xxp/base.c
|
||||
@@ -6052,7 +6052,11 @@ static void __devexit wctdm_remove_one(struct pci_dev *pdev)
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(wctdm_pci_tbl) = {
|
||||
{ 0xd161, 0x2400, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm2400 },
|
||||
+ { 0xd161, 0x0800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm800 },
|
||||
+ { 0xd161, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcaex800 },
|
||||
{ 0xd161, 0x8003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcaex2400 },
|
||||
+ { 0xd161, 0x8005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm410 },
|
||||
+ { 0xd161, 0x8006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcaex410 },
|
||||
{ 0xd161, 0x8007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcha80000 },
|
||||
{ 0xd161, 0x8008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wchb80000 },
|
||||
{ 0 }
|
|
@ -1,94 +0,0 @@
|
|||
From 4df746fe3ffd6678f36b16c9b0750fa552da92e4 Mon Sep 17 00:00:00 2001
|
||||
From: Shaun Ruffell <sruffell@sruffell.net>
|
||||
Date: Mon, 16 Nov 2020 22:01:21 -0600
|
||||
Subject: [PATCH] Remove support for 32-bit userspace with 64-bit kernel
|
||||
|
||||
I am not aware of anyone who tests in this configuration, and I'm not
|
||||
sure if it currently works. I'll remove any support for the time being
|
||||
and can add it back in if someone comes forward needing support for it.
|
||||
|
||||
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
|
||||
---
|
||||
drivers/dahdi/dahdi-base.c | 34 ----------------------------------
|
||||
1 file changed, 34 deletions(-)
|
||||
|
||||
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
|
||||
index 4fb06d9..9fb0c79 100644
|
||||
--- a/drivers/dahdi/dahdi-base.c
|
||||
+++ b/drivers/dahdi/dahdi-base.c
|
||||
@@ -7019,17 +7019,6 @@ static int dahdi_ioctl(struct inode *inode, struct file *file,
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_COMPAT_IOCTL
|
||||
-static long dahdi_ioctl_compat(struct file *file, unsigned int cmd,
|
||||
- unsigned long data)
|
||||
-{
|
||||
- if (cmd == DAHDI_SFCONFIG)
|
||||
- return -ENOTTY; /* Not supported yet */
|
||||
-
|
||||
- return dahdi_unlocked_ioctl(file, cmd, data);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
/**
|
||||
* _get_next_channo - Return the next taken channel number from the span list.
|
||||
* @span: The span with which to start the search.
|
||||
@@ -10285,9 +10274,6 @@ static const struct file_operations dahdi_fops = {
|
||||
.release = dahdi_release,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_unlocked_ioctl,
|
||||
-#ifdef HAVE_COMPAT_IOCTL
|
||||
- .compat_ioctl = dahdi_ioctl_compat,
|
||||
-#endif
|
||||
#else
|
||||
.ioctl = dahdi_ioctl,
|
||||
#endif
|
||||
@@ -10301,9 +10287,6 @@ static const struct file_operations dahdi_timer_fops = {
|
||||
.release = dahdi_timer_release,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_timer_unlocked_ioctl,
|
||||
-#ifdef HAVE_COMPAT_IOCTL
|
||||
- .compat_ioctl = dahdi_timer_unlocked_ioctl,
|
||||
-#endif
|
||||
#else
|
||||
.ioctl = dahdi_timer_ioctl,
|
||||
#endif
|
||||
@@ -10377,24 +10360,10 @@ static int nodev_ioctl(struct inode *inode, struct file *file,
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_COMPAT_IOCTL
|
||||
-static long nodev_ioctl_compat(struct file *file, unsigned int cmd,
|
||||
- unsigned long data)
|
||||
-{
|
||||
- if (cmd == DAHDI_SFCONFIG)
|
||||
- return -ENOTTY; /* Not supported yet */
|
||||
-
|
||||
- return nodev_unlocked_ioctl(file, cmd, data);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static const struct file_operations nodev_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = nodev_unlocked_ioctl,
|
||||
-#ifdef HAVE_COMPAT_IOCTL
|
||||
- .compat_ioctl = nodev_ioctl_compat,
|
||||
-#endif
|
||||
#else
|
||||
.ioctl = nodev_ioctl,
|
||||
#endif
|
||||
@@ -10409,9 +10378,6 @@ static const struct file_operations dahdi_chan_fops = {
|
||||
.release = dahdi_release,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_unlocked_ioctl,
|
||||
-#ifdef HAVE_COMPAT_IOCTL
|
||||
- .compat_ioctl = dahdi_ioctl_compat,
|
||||
-#endif
|
||||
#else
|
||||
.ioctl = dahdi_ioctl,
|
||||
#endif
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
From 6d4c748e0470efac90e7dc4538ff3c5da51f0169 Mon Sep 17 00:00:00 2001
|
||||
From: Shaun Ruffell <sruffell@sruffell.net>
|
||||
Date: Mon, 16 Nov 2020 22:01:22 -0600
|
||||
Subject: [PATCH] Remove checks for HAVE_UNLOCKED_IOCTL for kernel >= 5.9
|
||||
|
||||
In upstream commit (4e24566a134ea1674 "fs: remove the HAVE_UNLOCKED_IOCTL and
|
||||
HAVE_COMPAT_IOCTL defines") [1] the kernel removed these defines.
|
||||
|
||||
All supported kernels include support for the unlocked_ioctl now, so
|
||||
DAHDI can also remove these checks.
|
||||
|
||||
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4e24566a134ea167441a1ffa3d439a27c
|
||||
|
||||
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
|
||||
---
|
||||
drivers/dahdi/dahdi-base.c | 44 ---------------------------------
|
||||
drivers/dahdi/dahdi_transcode.c | 11 ---------
|
||||
2 files changed, 55 deletions(-)
|
||||
|
||||
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
|
||||
index 9fb0c79..bb51e9c 100644
|
||||
--- a/drivers/dahdi/dahdi-base.c
|
||||
+++ b/drivers/dahdi/dahdi-base.c
|
||||
@@ -53,10 +53,6 @@
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
-#if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL)
|
||||
-#include <linux/smp_lock.h>
|
||||
-#endif
|
||||
-
|
||||
#include <linux/ppp_defs.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
@@ -4069,14 +4065,6 @@ dahdi_timer_unlocked_ioctl(struct file *file, unsigned int cmd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#ifndef HAVE_UNLOCKED_IOCTL
|
||||
-static int dahdi_timer_ioctl(struct inode *inode, struct file *file,
|
||||
- unsigned int cmd, unsigned long data)
|
||||
-{
|
||||
- return dahdi_timer_unlocked_ioctl(file, cmd, data);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static int dahdi_ioctl_getgains(struct file *file, unsigned long data)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -7011,14 +6999,6 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#ifndef HAVE_UNLOCKED_IOCTL
|
||||
-static int dahdi_ioctl(struct inode *inode, struct file *file,
|
||||
- unsigned int cmd, unsigned long data)
|
||||
-{
|
||||
- return dahdi_unlocked_ioctl(file, cmd, data);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
/**
|
||||
* _get_next_channo - Return the next taken channel number from the span list.
|
||||
* @span: The span with which to start the search.
|
||||
@@ -10272,11 +10252,7 @@ static const struct file_operations dahdi_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_open,
|
||||
.release = dahdi_release,
|
||||
-#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_unlocked_ioctl,
|
||||
-#else
|
||||
- .ioctl = dahdi_ioctl,
|
||||
-#endif
|
||||
.poll = dahdi_poll,
|
||||
.read = dahdi_no_read,
|
||||
.write = dahdi_no_write,
|
||||
@@ -10285,11 +10261,7 @@ static const struct file_operations dahdi_fops = {
|
||||
static const struct file_operations dahdi_timer_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.release = dahdi_timer_release,
|
||||
-#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_timer_unlocked_ioctl,
|
||||
-#else
|
||||
- .ioctl = dahdi_timer_ioctl,
|
||||
-#endif
|
||||
.poll = dahdi_timer_poll,
|
||||
.read = dahdi_no_read,
|
||||
.write = dahdi_no_write,
|
||||
@@ -10352,21 +10324,9 @@ nodev_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long data)
|
||||
return nodev_common("ioctl");
|
||||
}
|
||||
|
||||
-#ifndef HAVE_UNLOCKED_IOCTL
|
||||
-static int nodev_ioctl(struct inode *inode, struct file *file,
|
||||
- unsigned int cmd, unsigned long data)
|
||||
-{
|
||||
- return nodev_unlocked_ioctl(file, cmd, data);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static const struct file_operations nodev_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
-#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = nodev_unlocked_ioctl,
|
||||
-#else
|
||||
- .ioctl = nodev_ioctl,
|
||||
-#endif
|
||||
.read = nodev_chan_read,
|
||||
.write = nodev_chan_write,
|
||||
.poll = nodev_chan_poll,
|
||||
@@ -10376,11 +10336,7 @@ static const struct file_operations dahdi_chan_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_open,
|
||||
.release = dahdi_release,
|
||||
-#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_unlocked_ioctl,
|
||||
-#else
|
||||
- .ioctl = dahdi_ioctl,
|
||||
-#endif
|
||||
.read = dahdi_chan_read,
|
||||
.write = dahdi_chan_write,
|
||||
.poll = dahdi_chan_poll,
|
||||
diff --git a/drivers/dahdi/dahdi_transcode.c b/drivers/dahdi/dahdi_transcode.c
|
||||
index a495dcf..6021aac 100644
|
||||
--- a/drivers/dahdi/dahdi_transcode.c
|
||||
+++ b/drivers/dahdi/dahdi_transcode.c
|
||||
@@ -397,13 +397,6 @@ static long dahdi_tc_unlocked_ioctl(struct file *file, unsigned int cmd, unsigne
|
||||
};
|
||||
}
|
||||
|
||||
-#ifndef HAVE_UNLOCKED_IOCTL
|
||||
-static int dahdi_tc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long data)
|
||||
-{
|
||||
- return (int)dahdi_tc_unlocked_ioctl(file, cmd, data);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static unsigned int dahdi_tc_poll(struct file *file, struct poll_table_struct *wait_table)
|
||||
{
|
||||
int ret;
|
||||
@@ -427,11 +420,7 @@ static struct file_operations __dahdi_transcode_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_tc_open,
|
||||
.release = dahdi_tc_release,
|
||||
-#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_tc_unlocked_ioctl,
|
||||
-#else
|
||||
- .ioctl = dahdi_tc_ioctl,
|
||||
-#endif
|
||||
.read = dahdi_tc_read,
|
||||
.write = dahdi_tc_write,
|
||||
.poll = dahdi_tc_poll,
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
From d55a2e89b74f752bb1b7a06ab57cebcc3f258d56 Mon Sep 17 00:00:00 2001
|
||||
From: Jaco Kroon <jaco@iewc.co.za>
|
||||
Date: Fri, 8 Jan 2021 14:27:30 +0200
|
||||
Subject: [PATCH] Enable building with CC=clang
|
||||
|
||||
This requires that the host kernel also be built with CC=clang.
|
||||
|
||||
Signed-off-by: Jaco Kroon <jaco@iewc.co.za>
|
||||
---
|
||||
drivers/dahdi/Kbuild | 2 +-
|
||||
drivers/dahdi/oct612x/Kbuild | 2 +-
|
||||
drivers/dahdi/voicebus/Kbuild | 2 +-
|
||||
drivers/dahdi/wcb4xxp/Kbuild | 2 +-
|
||||
drivers/dahdi/wct4xxp/Kbuild | 4 ++--
|
||||
drivers/dahdi/wctc4xxp/Kbuild | 2 +-
|
||||
drivers/dahdi/wctdm24xxp/Kbuild | 2 +-
|
||||
7 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild
|
||||
index c7144b6..a41021f 100644
|
||||
--- a/drivers/dahdi/Kbuild
|
||||
+++ b/drivers/dahdi/Kbuild
|
||||
@@ -59,7 +59,7 @@ obj-m += dahdi_echocan_oslec.o
|
||||
obj-m += ../staging/echo/echo.o
|
||||
endif
|
||||
|
||||
-CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) -Wno-format-truncation
|
||||
+CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) $(call cc-disable-warning, format-truncation)
|
||||
|
||||
ifndef HOTPLUG_FIRMWARE
|
||||
ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))
|
||||
diff --git a/drivers/dahdi/oct612x/Kbuild b/drivers/dahdi/oct612x/Kbuild
|
||||
index ac53fe7..9ff971c 100644
|
||||
--- a/drivers/dahdi/oct612x/Kbuild
|
||||
+++ b/drivers/dahdi/oct612x/Kbuild
|
||||
@@ -27,6 +27,6 @@ octapi_files = octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.o \
|
||||
# TODO: ccflags was added in 2.6.24 in commit f77bf01425b11947eeb3b5b54. This
|
||||
# should be changed to a conditional compilation based on the Kernel Version.
|
||||
# ccflags-y := -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
|
||||
-EXTRA_CFLAGS = -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
|
||||
+EXTRA_CFLAGS = -I$(src)/.. $(call cc-disable-warning,undef) -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
|
||||
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OCT612X) := oct612x.o
|
||||
oct612x-objs := $(octapi_files)
|
||||
diff --git a/drivers/dahdi/voicebus/Kbuild b/drivers/dahdi/voicebus/Kbuild
|
||||
index 3bf9640..4052515 100644
|
||||
--- a/drivers/dahdi/voicebus/Kbuild
|
||||
+++ b/drivers/dahdi/voicebus/Kbuild
|
||||
@@ -11,7 +11,7 @@ else
|
||||
EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
|
||||
+EXTRA_CFLAGS += -I$(src)/.. $(call cc-disable-warning, undef)
|
||||
|
||||
$(obj)/$(FIRM_DIR)/dahdi-fw-vpmoct032.o: $(obj)/voicebus.o
|
||||
$(MAKE) -C $(obj)/$(FIRM_DIR) dahdi-fw-vpmoct032.o
|
||||
diff --git a/drivers/dahdi/wcb4xxp/Kbuild b/drivers/dahdi/wcb4xxp/Kbuild
|
||||
index 80606bf..306e986 100644
|
||||
--- a/drivers/dahdi/wcb4xxp/Kbuild
|
||||
+++ b/drivers/dahdi/wcb4xxp/Kbuild
|
||||
@@ -1,6 +1,6 @@
|
||||
obj-m += wcb4xxp.o
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
|
||||
+EXTRA_CFLAGS += -I$(src)/.. $(call cc-disable-warning, undef)
|
||||
|
||||
wcb4xxp-objs := base.o
|
||||
|
||||
diff --git a/drivers/dahdi/wct4xxp/Kbuild b/drivers/dahdi/wct4xxp/Kbuild
|
||||
index cf01ccf..d4578da 100644
|
||||
--- a/drivers/dahdi/wct4xxp/Kbuild
|
||||
+++ b/drivers/dahdi/wct4xxp/Kbuild
|
||||
@@ -2,13 +2,13 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP) += wct4xxp.o
|
||||
|
||||
FIRM_DIR := ../firmware
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/.. -I$(src)/../oct612x/ $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef
|
||||
+EXTRA_CFLAGS += -I$(src)/.. -I$(src)/../oct612x/ $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) $(call cc-disable-warning, undef)
|
||||
|
||||
# The OCT612X source files are from a vendor drop and we do not want to edit
|
||||
# them to make this warning go away. Therefore, turn off the
|
||||
# unused-but-set-variable warning for this driver.
|
||||
|
||||
-EXTRA_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable)
|
||||
+#EXTRA_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
||||
|
||||
ifeq ($(HOTPLUG_FIRMWARE),yes)
|
||||
EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
|
||||
diff --git a/drivers/dahdi/wctc4xxp/Kbuild b/drivers/dahdi/wctc4xxp/Kbuild
|
||||
index 9f97498..451f380 100644
|
||||
--- a/drivers/dahdi/wctc4xxp/Kbuild
|
||||
+++ b/drivers/dahdi/wctc4xxp/Kbuild
|
||||
@@ -2,7 +2,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp.o
|
||||
|
||||
FIRM_DIR := ../firmware
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
|
||||
+EXTRA_CFLAGS += -I$(src)/.. $(call cc-disable-warning,undef)
|
||||
|
||||
ifeq ($(HOTPLUG_FIRMWARE),yes)
|
||||
EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
|
||||
diff --git a/drivers/dahdi/wctdm24xxp/Kbuild b/drivers/dahdi/wctdm24xxp/Kbuild
|
||||
index 22cc71a..98b99a9 100644
|
||||
--- a/drivers/dahdi/wctdm24xxp/Kbuild
|
||||
+++ b/drivers/dahdi/wctdm24xxp/Kbuild
|
||||
@@ -1,5 +1,5 @@
|
||||
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp.o
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
|
||||
+EXTRA_CFLAGS += -I$(src)/.. $(call cc-disable-warning, undef)
|
||||
|
||||
wctdm24xxp-objs := base.o xhfc.o
|
||||
--
|
||||
2.26.2
|
||||
|
Loading…
Reference in New Issue