summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD13
-rw-r--r--linux-4.2-vmalloc.patch49
3 files changed, 62 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index de728c2653d5..fae84d8e998f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pt1_drv-dkms-hg
pkgdesc = PT1/2 driver sources for DKMS
pkgver = r141.c8688d7d6382
- pkgrel = 1
+ pkgrel = 2
url = http://hg.honeyplanet.jp/pt1/
install = dkms.install
arch = i686
@@ -14,9 +14,11 @@ pkgbase = pt1_drv-dkms-hg
source = pt1_drv-dkms-hg::hg+http://hg.honeyplanet.jp/pt1/
source = dkms.conf
source = 99-pt1_drv.rules
+ source = linux-4.2-vmalloc.patch
sha1sums = SKIP
sha1sums = af3fc15f2b7e9e1fc9a8559546a0ed733f7115c6
sha1sums = ad3c58078fbd48b8f97ea24af2b084be29210b47
+ sha1sums = 547f63e6449a73e9072681babc89a7be12e2c07b
pkgname = pt1_drv-dkms-hg
diff --git a/PKGBUILD b/PKGBUILD
index 0842b64b6bf7..0fb459e9a5a7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=pt1_drv-dkms-hg
_pkgname=pt1_drv
pkgver=r141.c8688d7d6382
-pkgrel=1
+pkgrel=2
pkgdesc="PT1/2 driver sources for DKMS"
arch=('i686' 'x86_64')
url="http://hg.honeyplanet.jp/pt1/"
@@ -13,13 +13,19 @@ provides=('pt1_drv-dkms')
install=dkms.install
source=("$pkgname"::hg+'http://hg.honeyplanet.jp/pt1/'
dkms.conf
- 99-pt1_drv.rules)
+ 99-pt1_drv.rules
+ linux-4.2-vmalloc.patch)
pkgver() {
cd "$srcdir/$pkgname"
printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}
+prepare() {
+ cd "$srcdir/$pkgname"
+ patch -Np1 -i "$srcdir/linux-4.2-vmalloc.patch"
+}
+
build() {
cd "$srcdir/$pkgname/driver"
make version.h
@@ -36,4 +42,5 @@ package() {
# vim:set ts=2 sw=2 et:
sha1sums=('SKIP'
'af3fc15f2b7e9e1fc9a8559546a0ed733f7115c6'
- 'ad3c58078fbd48b8f97ea24af2b084be29210b47')
+ 'ad3c58078fbd48b8f97ea24af2b084be29210b47'
+ '547f63e6449a73e9072681babc89a7be12e2c07b')
diff --git a/linux-4.2-vmalloc.patch b/linux-4.2-vmalloc.patch
new file mode 100644
index 000000000000..c839f1a30b59
--- /dev/null
+++ b/linux-4.2-vmalloc.patch
@@ -0,0 +1,49 @@
+# HG changeset patch
+# User Kohei Suzuki <eagletmt@gmail.com>
+# Date 1446531070 -32400
+# Tue Nov 03 15:11:10 2015 +0900
+# Branch linux-4.2-vmalloc
+# Node ID 13436a0b7e593ff0f29a8a267275fdce8cf2f95d
+# Parent c8688d7d6382dcc96ea739b75fca93299ae1e455
+Fix compile error on Linux 4.2 or above
+
+```
+% make
+revh=`hg parents --template '#define DRV_VERSION "r{rev}:{node|short}"\n#define DRV_RELDATE "{date|shortdate}"\n' 2>/dev/null`; \
+if [ -n "$revh" ] ; then \
+ echo "$revh" > version.h; \
+else \
+ printf "#define DRV_VERSION \""1.1.0"\"\n#define DRV_RELDATE \""2010-01-27"\"\n" > version.h; \
+fi
+make -C /lib/modules/`uname -r`/build M=`pwd` V=0 modules
+make[1]: Entering directory '/usr/lib/modules/4.2.5-1-ARCH/build'
+ CC [M] /home/eagletmt/.ghq/hg.honeyplanet.jp/pt1/driver/pt1_pci.o
+/home/eagletmt/.ghq/hg.honeyplanet.jp/pt1/driver/pt1_pci.c: In function ‘pt1_pci_init_one’:
+/home/eagletmt/.ghq/hg.honeyplanet.jp/pt1/driver/pt1_pci.c:857:20: error: implicit declaration of function ‘vmalloc’ [-Werror=implicit-function-declaration]
+ channel->buf = vmalloc(CHANNEL_DMA_SIZE);
+ ^
+/home/eagletmt/.ghq/hg.honeyplanet.jp/pt1/driver/pt1_pci.c:857:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
+ channel->buf = vmalloc(CHANNEL_DMA_SIZE);
+ ^
+/home/eagletmt/.ghq/hg.honeyplanet.jp/pt1/driver/pt1_pci.c:862:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
+ channel->buf = vmalloc(BS_CHANNEL_DMA_SIZE);
+ ^
+/home/eagletmt/.ghq/hg.honeyplanet.jp/pt1/driver/pt1_pci.c:911:5: error: implicit declaration of function ‘vfree’ [-Werror=implicit-function-declaration]
+ vfree(dev_conf->channel[lp]->buf);
+ ^
+cc1: some warnings being treated as errors
+```
+
+diff -r c8688d7d6382 -r 13436a0b7e59 driver/pt1_pci.c
+--- a/driver/pt1_pci.c Tue Oct 01 16:36:12 2013 +0900
++++ b/driver/pt1_pci.c Tue Nov 03 15:11:10 2015 +0900
+@@ -29,6 +29,9 @@
+ } pm_message_t;
+ #endif
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
++#include <linux/vmalloc.h>
++#endif
+ #include <linux/kthread.h>
+ #include <linux/dma-mapping.h>
+