summaryrefslogtreecommitdiffstats
path: root/main/dahdi-linux-grsec
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-12-14 10:05:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-12-14 10:05:05 +0000
commit8855752b2fd186298e2eee17300bf7680c791969 (patch)
tree40573e73ff6fabb45297a00b560f03d6640848f4 /main/dahdi-linux-grsec
parent064b114772b240f7771808b01257b8f7802e196e (diff)
downloadaports-8855752b2fd186298e2eee17300bf7680c791969.tar.bz2
aports-8855752b2fd186298e2eee17300bf7680c791969.tar.xz
main/dahdi-linux-grsec: add patch for 2.6.32 kernel
Diffstat (limited to 'main/dahdi-linux-grsec')
-rw-r--r--main/dahdi-linux-grsec/APKBUILD4
-rw-r--r--main/dahdi-linux-grsec/dahdi-2.2.0.2-driver_data-2.6.32.patch84
2 files changed, 87 insertions, 1 deletions
diff --git a/main/dahdi-linux-grsec/APKBUILD b/main/dahdi-linux-grsec/APKBUILD
index eccec0af5..f4c85c23b 100644
--- a/main/dahdi-linux-grsec/APKBUILD
+++ b/main/dahdi-linux-grsec/APKBUILD
@@ -34,6 +34,7 @@ source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realna
zaphfc-dahdi-flortz.diff
dahdi-linux-2.2.0-hfc-4s.patch
dahdi-2.6.31.patch
+ dahdi-2.2.0.2-driver_data-2.6.32.patch
"
prepare() {
@@ -75,4 +76,5 @@ c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch
a822c092f0548cd13f5e8d8cba053af6 dahdi-zaphfc.patch
291c5c44c86ab02443a742415461ddca zaphfc-dahdi-flortz.diff
68dfe17a49cca15ae439fd83f4ccfbc5 dahdi-linux-2.2.0-hfc-4s.patch
-bd5e7457ee8f37c10ed7ec383995e4fa dahdi-2.6.31.patch"
+bd5e7457ee8f37c10ed7ec383995e4fa dahdi-2.6.31.patch
+7f9452ef37385e03e05147081d6951a1 dahdi-2.2.0.2-driver_data-2.6.32.patch"
diff --git a/main/dahdi-linux-grsec/dahdi-2.2.0.2-driver_data-2.6.32.patch b/main/dahdi-linux-grsec/dahdi-2.2.0.2-driver_data-2.6.32.patch
new file mode 100644
index 000000000..3085218c0
--- /dev/null
+++ b/main/dahdi-linux-grsec/dahdi-2.2.0.2-driver_data-2.6.32.patch
@@ -0,0 +1,84 @@
+diff -uNr dahdi-linux-2.2.0.2.ORIg/drivers/dahdi/xpp/xbus-sysfs.c dahdi-linux-2.2.0.2/drivers/dahdi/xpp/xbus-sysfs.c
+--- dahdi-linux-2.2.0.2.ORIg/drivers/dahdi/xpp/xbus-sysfs.c 2009-10-22 18:04:47.000000000 +0100
++++ dahdi-linux-2.2.0.2/drivers/dahdi/xpp/xbus-sysfs.c 2009-10-22 18:05:54.000000000 +0100
+@@ -707,7 +707,11 @@
+ dev->parent = &xbus->astribank;
+ dev_set_name(dev, "%02d:%1x:%1x", xbus->num, xpd->addr.unit,
+ xpd->addr.subunit);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ dev_set_drvdata(dev, xpd);
++#else
+ dev->driver_data = xpd;
++#endif
+ dev->release = xpd_release;
+ ret = device_register(dev);
+ if(ret) {
+@@ -728,11 +732,21 @@
+ BUG_ON(!xbus);
+ XPD_DBG(DEVICES, xpd, "SYSFS\n");
+ dev = &xpd->xpd_dev;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ if(!dev_get_drvdata(dev))
++ return;
++ BUG_ON(dev_get_drvdata(dev) != xpd);
++#else
+ if(!dev->driver_data)
+ return;
+ BUG_ON(dev->driver_data != xpd);
++#endif
+ device_unregister(dev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ dev_set_drvdata(dev, NULL);
++#else
+ dev->driver_data = NULL;
++#endif
+ }
+
+ /*--------- Sysfs Device handling ----*/
+@@ -746,9 +760,15 @@
+ astribank = &xbus->astribank;
+ BUG_ON(!astribank);
+ sysfs_remove_link(&astribank->kobj, "transport");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ if(!dev_get_drvdata(astribank))
++ return;
++ BUG_ON(dev_get_drvdata(astribank) != xbus);
++#else
+ if(!astribank->driver_data)
+ return;
+ BUG_ON(astribank->driver_data != xbus);
++#endif
+ device_unregister(&xbus->astribank);
+ }
+
+@@ -764,18 +784,30 @@
+ astribank->bus = &toplevel_bus_type;
+ astribank->parent = xbus->transport.transport_device;
+ dev_set_name(astribank, "xbus-%02d", xbus->num);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ dev_set_drvdata(astribank, xbus);
++#else
+ astribank->driver_data = xbus;
++#endif
+ astribank->release = astribank_release;
+ ret = device_register(astribank);
+ if(ret) {
+ XBUS_ERR(xbus, "%s: device_register failed: %d\n", __FUNCTION__, ret);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ dev_set_drvdata(astribank, NULL);
++#else
+ astribank->driver_data = NULL;
++#endif
+ goto out;
+ }
+ ret = sysfs_create_link(&astribank->kobj, &astribank->parent->kobj, "transport");
+ if(ret < 0) {
+ XBUS_ERR(xbus, "%s: sysfs_create_link failed: %d\n", __FUNCTION__, ret);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++ dev_set_drvdata(astribank, NULL);
++#else
+ astribank->driver_data = NULL;
++#endif
+ goto out;
+ }
+ out: