aboutsummaryrefslogtreecommitdiffstats
path: root/main/dahdi-linux-grsec/zaphfc-dahdi-2.4.0.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-10-26 15:04:34 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-10-26 15:05:44 +0300
commit153c38dde26bbbac83b42b7b367c2e17c1cab7bc (patch)
tree12f4d437666bf0fa41f13450ad8005fd83fa28d4 /main/dahdi-linux-grsec/zaphfc-dahdi-2.4.0.patch
parentf036d3c8ae9a0606d1a84ff9d16a259ad4bfffd8 (diff)
downloadaports-153c38dde26bbbac83b42b7b367c2e17c1cab7bc.tar.bz2
aports-153c38dde26bbbac83b42b7b367c2e17c1cab7bc.tar.xz
main/dahdi-linux-grsec: update to 2.4.0
and update zaphfc to compile with new dahdi
Diffstat (limited to 'main/dahdi-linux-grsec/zaphfc-dahdi-2.4.0.patch')
-rw-r--r--main/dahdi-linux-grsec/zaphfc-dahdi-2.4.0.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/main/dahdi-linux-grsec/zaphfc-dahdi-2.4.0.patch b/main/dahdi-linux-grsec/zaphfc-dahdi-2.4.0.patch
new file mode 100644
index 0000000000..80500a574a
--- /dev/null
+++ b/main/dahdi-linux-grsec/zaphfc-dahdi-2.4.0.patch
@@ -0,0 +1,58 @@
+Index: dahdi-linux-2.4.0/drivers/dahdi/zaphfc.c
+===================================================================
+--- dahdi-linux-2.4.0.orig/drivers/dahdi/zaphfc.c 2010-10-26 14:41:21.000000000 +0300
++++ dahdi-linux-2.4.0/drivers/dahdi/zaphfc.c 2010-10-26 14:50:14.000000000 +0300
+@@ -617,7 +617,7 @@
+ }
+
+ static int zthfc_startup(struct dahdi_span *span) {
+- struct dahdi_hfc *zthfc = span->pvt;
++ struct dahdi_hfc *zthfc = container_of(span, struct dahdi_hfc, span);
+ struct hfc_card *hfctmp = zthfc->card;
+ int alreadyrunning;
+
+@@ -663,6 +663,19 @@
+ return 0;
+ }
+
++static const struct dahdi_span_ops zaphfc_span_ops = {
++ .owner = THIS_MODULE,
++ .spanconfig = zthfc_spanconfig,
++ .chanconfig = zthfc_chanconfig,
++ .startup = zthfc_startup,
++ .shutdown = zthfc_shutdown,
++ .maint = zthfc_maint,
++ .rbsbits = zthfc_rbsbits,
++ .open = zthfc_open,
++ .close = zthfc_close,
++ .ioctl = zthfc_ioctl,
++};
++
+ static int zthfc_initialize(struct dahdi_hfc *zthfc) {
+ struct hfc_card *hfctmp = zthfc->card;
+ int i;
+@@ -676,15 +689,7 @@
+ sprintf(zthfc->span.desc, "HFC-S PCI A ISDN card %d [TE]", hfc_dev_count + 1);
+ }
+
+- zthfc->span.spanconfig = zthfc_spanconfig;
+- zthfc->span.chanconfig = zthfc_chanconfig;
+- zthfc->span.startup = zthfc_startup;
+- zthfc->span.shutdown = zthfc_shutdown;
+- zthfc->span.maint = zthfc_maint;
+- zthfc->span.rbsbits = zthfc_rbsbits;
+- zthfc->span.open = zthfc_open;
+- zthfc->span.close = zthfc_close;
+- zthfc->span.ioctl = zthfc_ioctl;
++ zthfc->span.ops = &zaphfc_span_ops;
+
+ zthfc->span.channels = 3;
+ zthfc->span.chans = zthfc->_chans;
+@@ -695,7 +700,6 @@
+ zthfc->span.linecompat = DAHDI_CONFIG_AMI | DAHDI_CONFIG_CCS; // <--- this is really BS
+ zthfc->span.offset = 0;
+ init_waitqueue_head(&zthfc->span.maintq);
+- zthfc->span.pvt = zthfc;
+
+ for (i = 0; i < zthfc->span.channels; i++) {
+ memset(&(zthfc->chans[i]), 0x0, sizeof(struct dahdi_chan));