summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Ernst2016-02-12 18:27:28 +0100
committerOle Ernst2016-02-12 18:27:28 +0100
commit90ec58e04b03e7b280a9d5baf977d65bb14cf2cd (patch)
tree67134dc597d97204948b65be4929cd69eafa4e32
parentcbf9a6279df0bb62e61c408a72ce333faefbc3c0 (diff)
downloadaur-90ec58e04b03e7b280a9d5baf977d65bb14cf2cd.tar.gz
fix build against 4.4.x kernel properly
-rw-r--r--.SRCINFO6
-rw-r--r--4.4-compat.patch108
-rw-r--r--PKGBUILD10
3 files changed, 118 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8e043825313..4961d7006c8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Fri Feb 12 16:46:23 UTC 2016
+# Fri Feb 12 17:26:27 UTC 2016
pkgbase = media-build-dvbsky
pkgdesc = Driver for DVBSky cards/boxes
pkgver = 20151028
- pkgrel = 4
+ pkgrel = 5
url = http://www.dvbsky.net/Support_linux.html
install = media-build-dvbsky.install
arch = i686
@@ -17,9 +17,11 @@ pkgbase = media-build-dvbsky
source = http://www.dvbsky.net/download/linux/media_build-bst-151028.tar.gz
source = add_c2800e.patch
source = 4.3-compat.patch
+ source = 4.4-compat.patch
sha256sums = 48a8726c6799025be06bc5b8bafa8449ca02abf8fe578e805f91707a5edf1e52
sha256sums = bdb4cb06418cb2e36eb3219b4d4be329d5297db1704e6e3ef0c73dd6bb9721f1
sha256sums = e4991181b5a658f93ff6f454c22eb13955c8ae8ad19d3ddef1a0d7cc281c832e
+ sha256sums = 42e4e6b6011f1126e69d8fd1cc06af72b4baa396b551c18a54de632d572c7d8c
pkgname = media-build-dvbsky
diff --git a/4.4-compat.patch b/4.4-compat.patch
new file mode 100644
index 00000000000..36d2f2ea5fd
--- /dev/null
+++ b/4.4-compat.patch
@@ -0,0 +1,108 @@
+--- a/linux/drivers/media/pci/cx23885/cx23885-core.c
++++ b/linux/drivers/media/pci/cx23885/cx23885-core.c
+@@ -1989,9 +1989,9 @@ static int cx23885_initdev(struct pci_de
+ (unsigned long long)pci_resource_start(pci_dev, 0));
+
+ pci_set_master(pci_dev);
+- if (!pci_dma_supported(pci_dev, 0xffffffff)) {
++ err = pci_set_dma_mask(pci_dev, 0xffffffff);
++ if (err) {
+ printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name);
+- err = -EIO;
+ goto fail_context;
+ }
+
+--- a/linux/drivers/media/pci/cx25821/cx25821-core.c
++++ b/linux/drivers/media/pci/cx25821/cx25821-core.c
+@@ -1315,7 +1315,8 @@ static int cx25821_initdev(struct pci_de
+ dev->pci_lat, (unsigned long long)dev->base_io_addr);
+
+ pci_set_master(pci_dev);
+- if (!pci_dma_supported(pci_dev, 0xffffffff)) {
++ err = pci_set_dma_mask(pci_dev, 0xffffffff);
++ if (err) {
+ pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name);
+ err = -EIO;
+ goto fail_irq;
+--- a/linux/drivers/media/pci/cx88/cx88-alsa.c
++++ b/linux/drivers/media/pci/cx88/cx88-alsa.c
+@@ -890,9 +890,9 @@ static int snd_cx88_create(struct snd_ca
+ return err;
+ }
+
+- if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) {
++ err = pci_set_dma_mask(pci,DMA_BIT_MASK(32));
++ if (err) {
+ dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
+- err = -EIO;
+ cx88_core_put(core, pci);
+ return err;
+ }
+--- a/linux/drivers/media/pci/cx88/cx88-mpeg.c
++++ b/linux/drivers/media/pci/cx88/cx88-mpeg.c
+@@ -397,7 +397,8 @@ static int cx8802_init_common(struct cx8
+ if (pci_enable_device(dev->pci))
+ return -EIO;
+ pci_set_master(dev->pci);
+- if (!pci_dma_supported(dev->pci,DMA_BIT_MASK(32))) {
++ err = pci_set_dma_mask(dev->pci,DMA_BIT_MASK(32));
++ if (err) {
+ printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name);
+ return -EIO;
+ }
+--- a/linux/drivers/media/pci/cx88/cx88-video.c
++++ b/linux/drivers/media/pci/cx88/cx88-video.c
+@@ -1332,9 +1332,9 @@ static int cx8800_initdev(struct pci_dev
+ dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
+
+ pci_set_master(pci_dev);
+- if (!pci_dma_supported(pci_dev,DMA_BIT_MASK(32))) {
++ err = pci_set_dma_mask(pci_dev,DMA_BIT_MASK(32));
++ if (err) {
+ printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name);
+- err = -EIO;
+ goto fail_core;
+ }
+ dev->alloc_ctx = vb2_dma_sg_init_ctx(&pci_dev->dev);
+--- a/linux/drivers/media/pci/saa7134/saa7134-core.c
++++ b/linux/drivers/media/pci/saa7134/saa7134-core.c
+@@ -948,9 +948,9 @@ static int saa7134_initdev(struct pci_de
+ pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
+ dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
+ pci_set_master(pci_dev);
+- if (!pci_dma_supported(pci_dev, DMA_BIT_MASK(32))) {
++ err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
++ if (err) {
+ printk("%s: Oops: no 32bit PCI DMA ???\n",dev->name);
+- err = -EIO;
+ goto fail1;
+ }
+
+--- a/linux/drivers/media/pci/saa7164/saa7164-core.c
++++ b/linux/drivers/media/pci/saa7164/saa7164-core.c
+@@ -1224,9 +1224,9 @@ static int saa7164_initdev(struct pci_de
+
+ pci_set_master(pci_dev);
+ /* TODO */
+- if (!pci_dma_supported(pci_dev, 0xffffffff)) {
++ err = pci_set_dma_mask(pci_dev, 0xffffffff);
++ if (err) {
+ printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name);
+- err = -EIO;
+ goto fail_irq;
+ }
+
+--- a/linux/drivers/media/pci/tw68/tw68-core.c
++++ b/linux/drivers/media/pci/tw68/tw68-core.c
+@@ -256,9 +256,9 @@ static int tw68_initdev(struct pci_dev *
+ dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
+ dev->pci_lat, (u64)pci_resource_start(pci_dev, 0));
+ pci_set_master(pci_dev);
+- if (!pci_dma_supported(pci_dev, DMA_BIT_MASK(32))) {
++ err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
++ if (err) {
+ pr_info("%s: Oops: no 32bit PCI DMA ???\n", dev->name);
+- err = -EIO;
+ goto fail1;
+ }
+
diff --git a/PKGBUILD b/PKGBUILD
index 4981e63d01b..3a05c5e0bf1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Ole Ernst <olebowle[at]gmx[dot]com>
pkgname=media-build-dvbsky
pkgver=20151028
-pkgrel=4
+pkgrel=5
pkgdesc="Driver for DVBSky cards/boxes"
arch=('i686' 'x86_64')
url="http://www.dvbsky.net/Support_linux.html"
@@ -13,10 +13,12 @@ replaces=('dvbsky-dvb-drivers')
install="$pkgname.install"
source=("http://www.dvbsky.net/download/linux/media_build-bst-151028.tar.gz"
'add_c2800e.patch'
- '4.3-compat.patch')
+ '4.3-compat.patch'
+ '4.4-compat.patch')
sha256sums=('48a8726c6799025be06bc5b8bafa8449ca02abf8fe578e805f91707a5edf1e52'
'bdb4cb06418cb2e36eb3219b4d4be329d5297db1704e6e3ef0c73dd6bb9721f1'
- 'e4991181b5a658f93ff6f454c22eb13955c8ae8ad19d3ddef1a0d7cc281c832e')
+ 'e4991181b5a658f93ff6f454c22eb13955c8ae8ad19d3ddef1a0d7cc281c832e'
+ '42e4e6b6011f1126e69d8fd1cc06af72b4baa396b551c18a54de632d572c7d8c')
prepare() {
cd "$srcdir/media_build-bst"
@@ -25,7 +27,7 @@ prepare() {
sed -i '/depmod/d' v4l/Makefile v4l/scripts/make_makefile.pl
patch -p1 -i ../add_c2800e.patch
patch -p1 -i ../4.3-compat.patch
- grep -rl pci_dma_supported | xargs sed -i 's/pci_dma_supported/pci_set_dma_mask/'
+ patch -p1 -i ../4.4-compat.patch
export _kernver=$(</usr/lib/modules/extramodules-[0-9]\.+([0-9])-ARCH/version)
sed -i "s/KERNEL_VERSION=.*/KERNEL_VERSION=$_kernver/" "$startdir/$install"
}