diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-10-26 15:05:06 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2010-10-26 15:05:45 +0300 |
commit | 7cd9efdbe3159245205d4055ab801b3d0d4e23f8 (patch) | |
tree | d0dced343d3d8621c952d5cc032a5eee26655c87 /main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch | |
parent | 153c38dde26bbbac83b42b7b367c2e17c1cab7bc (diff) | |
download | aports-7cd9efdbe3159245205d4055ab801b3d0d4e23f8.tar.bz2 aports-7cd9efdbe3159245205d4055ab801b3d0d4e23f8.tar.xz |
main/dahdi-linux-vserver: update to 2.4.0
and update zaphfc to compile with new dahdi
Diffstat (limited to 'main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch')
-rw-r--r-- | main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch b/main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch new file mode 100644 index 000000000..80500a574 --- /dev/null +++ b/main/dahdi-linux-vserver/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)); |