diff options
author | NBonaparte | 2016-12-13 22:10:07 -0800 |
---|---|---|
committer | NBonaparte | 2016-12-13 22:10:07 -0800 |
commit | 767b00d4d2d7fcced3615967e3f7d87d7fc38807 (patch) | |
tree | a752d0a1a5cad30abfef4e3a4bdef7bee73ca2e7 | |
parent | 2367b688e374ffdbc585fb89147587edb9f89379 (diff) | |
download | aur-767b00d4d2d7fcced3615967e3f7d87d7fc38807.tar.gz |
patch: add patch for kernels >= 4.8
-rw-r--r-- | 4.8.patch | 19 | ||||
-rw-r--r-- | PKGBUILD | 15 |
2 files changed, 30 insertions, 4 deletions
diff --git a/4.8.patch b/4.8.patch new file mode 100644 index 000000000000..c94914cdd241 --- /dev/null +++ b/4.8.patch @@ -0,0 +1,19 @@ +diff --git a/smi2021_v4l2.c b/smi2021_v4l2.c +index 9d8fa3d..a72c29a 100644 +--- a/smi2021_v4l2.c ++++ b/smi2021_v4l2.c +@@ -194,7 +194,13 @@ static int queue_setup(struct vb2_queue *vq, + const void *parg, + #endif + unsigned int *nbuffers, unsigned int *nplanes, +- unsigned int sizes[], void *alloc_ctxs[]) ++ unsigned int sizes[], ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) ++ void *alloc_ctxs[] ++#else ++ struct device *alloc_devs[] ++#endif ++ ) + { + struct smi2021 *smi2021 = vb2_get_drv_priv(vq); + *nbuffers = clamp_t(unsigned int, *nbuffers, 4, 16); @@ -5,16 +5,18 @@ _altname=$(printf ${pkgname%%-git}) _gitname=smi2021 _gitbranch=master _gitauthor=Manouchehri -pkgver=v0.0.1.r46.g61569ba -pkgrel=3 +pkgver=v0.0.1.r56.g5520828 +pkgrel=1 pkgdesc="EasyCap driver module" url="https://github.com/$_gitauthor/$_gitname" license=('GPL') source=("git://github.com/$_gitauthor/$_gitname.git#branch=$_gitbranch" - "https://github.com/stevelacy/EasyCap/raw/master/somagic_firmware.bin") + "https://github.com/stevelacy/EasyCap/raw/master/somagic_firmware.bin" + "4.8.patch") validpgpkeys=('F0FE029614EA35BC9E4F9768A6ECFD0C40839755') # David Manouchehri sha512sums=('SKIP' - '722128600bd982b1ff6af8e372e361d22ee872282aeab50b62d8769ad2ee08bb2c6612f59ba48736a26c2c47704a7e192af2746ac0746a074bc3aa242bffa712') + '722128600bd982b1ff6af8e372e361d22ee872282aeab50b62d8769ad2ee08bb2c6612f59ba48736a26c2c47704a7e192af2746ac0746a074bc3aa242bffa712' + '99f0049238b735e56ad1ffbb62a88e04d71172eb581eb99de343919f04917ea9934239b29ba0b2432a097385ebe71bd45e1b58d1ea582ccf95a20cfc5d041f95') arch=('i686' 'x86_64') depends=('') makedepends=('git' 'linux-headers') @@ -31,6 +33,11 @@ pkgver() { ) } +prepare() { + cd "$srcdir/$_gitname" + patch -p1 -i "$srcdir/4.8.patch" +} + build() { cd "$srcdir/$_gitname" sed -i '0,/obj/{s/$(CONFIG_VIDEO_SMI2021)/m/}' Makefile # Without this, no modules will be built. |