diff options
author | Ole Ernst | 2016-01-19 20:36:36 +0100 |
---|---|---|
committer | Ole Ernst | 2016-01-19 20:36:36 +0100 |
commit | 92f9c507b6f3304cb78b918cc3c0bb55472eaae7 (patch) | |
tree | 83795557c1099077ba582e52715082dfc8db5ffc | |
parent | 5ffbfe7a0b7659a5450f6e7739fc284cf34853af (diff) | |
download | aur-92f9c507b6f3304cb78b918cc3c0bb55472eaae7.tar.gz |
cgit patches aren't as static as hoped for, ship our own compatibility patch
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 4.3-compat.patch | 83 | ||||
-rw-r--r-- | PKGBUILD | 13 |
3 files changed, 91 insertions, 15 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Fri Jan 1 15:32:33 UTC 2016 +# Tue Jan 19 19:34:29 UTC 2016 pkgbase = media-build-dvbsky pkgdesc = Driver for DVBSky cards/boxes pkgver = 20151028 - pkgrel = 2 + pkgrel = 3 url = http://www.dvbsky.net/Support_linux.html install = media-build-dvbsky.install arch = i686 @@ -16,12 +16,10 @@ pkgbase = media-build-dvbsky replaces = dvbsky-dvb-drivers source = http://www.dvbsky.net/download/linux/media_build-bst-151028.tar.gz source = add_c2800e.patch - source = 269bd13.patch::https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=269bd1324fbfaa52832bb3efe9f5105c9146a33a - source = b36ae85.patch::https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=b36ae8532f48916d46f92c048d4866ee50e5fc67 + source = 4.3-compat.patch sha256sums = 48a8726c6799025be06bc5b8bafa8449ca02abf8fe578e805f91707a5edf1e52 sha256sums = bdb4cb06418cb2e36eb3219b4d4be329d5297db1704e6e3ef0c73dd6bb9721f1 - sha256sums = e2440075219f84cf5029bcedddd42ace5cbee13ab306275c2c513c25ea2a4efb - sha256sums = 9b6c1b98f2e85afe17c97d7577db1d7bd07454a11e2fda0b7661d5fe7ca6635f + sha256sums = e4991181b5a658f93ff6f454c22eb13955c8ae8ad19d3ddef1a0d7cc281c832e pkgname = media-build-dvbsky diff --git a/4.3-compat.patch b/4.3-compat.patch new file mode 100644 index 000000000000..a3eddd4958cd --- /dev/null +++ b/4.3-compat.patch @@ -0,0 +1,83 @@ +--- a/linux/drivers/media/i2c/adv7604.c ++++ b/linux/drivers/media/i2c/adv7604.c +@@ -606,12 +606,8 @@ static void adv7604_set_hpd(struct adv76 + { + unsigned int i; + +- for (i = 0; i < state->info->num_dv_ports; ++i) { +- if (IS_ERR(state->hpd_gpio[i])) +- continue; +- ++ for (i = 0; i < state->info->num_dv_ports; ++i) + gpiod_set_value_cansleep(state->hpd_gpio[i], hpd & BIT(i)); +- } + + v4l2_subdev_notify(&state->sd, ADV7604_HOTPLUG, &hpd); + } +@@ -2796,13 +2792,13 @@ static int adv7604_probe(struct i2c_clie + /* Request GPIOs. */ + for (i = 0; i < state->info->num_dv_ports; ++i) { + state->hpd_gpio[i] = +- devm_gpiod_get_index(&client->dev, "hpd", i); ++ devm_gpiod_get_index_optional(&client->dev, "hpd", i, ++ GPIOD_OUT_LOW); + if (IS_ERR(state->hpd_gpio[i])) +- continue; +- +- gpiod_direction_output(state->hpd_gpio[i], 0); ++ return PTR_ERR(state->hpd_gpio[i]); + +- v4l_info(client, "Handling HPD %u GPIO\n", i); ++ if (state->hpd_gpio[i]) ++ v4l_info(client, "Handling HPD %u GPIO\n", i); + } + + state->timings = cea640x480; +--- a/linux/drivers/media/radio/si4713/si4713.c ++++ b/linux/drivers/media/radio/si4713/si4713.c +@@ -383,7 +383,7 @@ static int si4713_powerup(struct si4713_ + } + } + +- if (!IS_ERR(sdev->gpio_reset)) { ++ if (sdev->gpio_reset) { + udelay(50); + gpiod_set_value(sdev->gpio_reset, 1); + } +@@ -407,8 +407,7 @@ static int si4713_powerup(struct si4713_ + SI4713_STC_INT | SI4713_CTS); + return err; + } +- if (!IS_ERR(sdev->gpio_reset)) +- gpiod_set_value(sdev->gpio_reset, 0); ++ gpiod_set_value(sdev->gpio_reset, 0); + + + if (sdev->vdd) { +@@ -447,7 +446,7 @@ static int si4713_powerdown(struct si471 + v4l2_dbg(1, debug, &sdev->sd, "Power down response: 0x%02x\n", + resp[0]); + v4l2_dbg(1, debug, &sdev->sd, "Device in reset mode\n"); +- if (!IS_ERR(sdev->gpio_reset)) ++ if (sdev->gpio_reset) + gpiod_set_value(sdev->gpio_reset, 0); + + if (sdev->vdd) { +@@ -1460,14 +1459,9 @@ static int si4713_probe(struct i2c_clien + goto exit; + } + +- sdev->gpio_reset = devm_gpiod_get(&client->dev, "reset"); +- if (!IS_ERR(sdev->gpio_reset)) { +- gpiod_direction_output(sdev->gpio_reset, 0); +- } else if (PTR_ERR(sdev->gpio_reset) == -ENOENT) { +- dev_dbg(&client->dev, "No reset GPIO assigned\n"); +- } else if (PTR_ERR(sdev->gpio_reset) == -ENOSYS) { +- dev_dbg(&client->dev, "No reset GPIO support\n"); +- } else { ++ sdev->gpio_reset = devm_gpiod_get_optional(&client->dev, "reset", ++ GPIOD_OUT_LOW); ++ if (IS_ERR(sdev->gpio_reset)) { + rval = PTR_ERR(sdev->gpio_reset); + dev_err(&client->dev, "Failed to request gpio: %d\n", rval); + goto exit; @@ -1,7 +1,7 @@ # Maintainer: Ole Ernst <olebowle[at]gmx[dot]com> pkgname=media-build-dvbsky pkgver=20151028 -pkgrel=2 +pkgrel=3 pkgdesc="Driver for DVBSky cards/boxes" arch=('i686' 'x86_64') url="http://www.dvbsky.net/Support_linux.html" @@ -13,12 +13,10 @@ replaces=('dvbsky-dvb-drivers') install="$pkgname.install" source=("http://www.dvbsky.net/download/linux/media_build-bst-151028.tar.gz" 'add_c2800e.patch' - '269bd13.patch::https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=269bd1324fbfaa52832bb3efe9f5105c9146a33a' - 'b36ae85.patch::https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=b36ae8532f48916d46f92c048d4866ee50e5fc67') + '4.3-compat.patch') sha256sums=('48a8726c6799025be06bc5b8bafa8449ca02abf8fe578e805f91707a5edf1e52' 'bdb4cb06418cb2e36eb3219b4d4be329d5297db1704e6e3ef0c73dd6bb9721f1' - 'e2440075219f84cf5029bcedddd42ace5cbee13ab306275c2c513c25ea2a4efb' - '9b6c1b98f2e85afe17c97d7577db1d7bd07454a11e2fda0b7661d5fe7ca6635f') + 'e4991181b5a658f93ff6f454c22eb13955c8ae8ad19d3ddef1a0d7cc281c832e') prepare() { cd "$srcdir/media_build-bst" @@ -26,10 +24,7 @@ prepare() { cp v4l/sit2_mod.dvb linux/drivers/media/dvb-frontends/sit2_mod.c sed -i '/depmod/d' v4l/Makefile v4l/scripts/make_makefile.pl patch -p1 -i ../add_c2800e.patch - cd linux - patch -p1 -i ../../269bd13.patch - patch -p1 -i ../../b36ae85.patch - + patch -p1 -i ../4.3-compat.patch export _kernver=$(</usr/lib/modules/extramodules-[0-9]\.+([0-9])-ARCH/version) sed -i "s/KERNEL_VERSION=.*/KERNEL_VERSION=$_kernver/" "$startdir/$install" } |