diff options
Diffstat (limited to 'drivers/dahdi/wcte11xp.c')
-rw-r--r-- | drivers/dahdi/wcte11xp.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/dahdi/wcte11xp.c b/drivers/dahdi/wcte11xp.c index 32d4f5b..ec73cbf 100644 --- a/drivers/dahdi/wcte11xp.c +++ b/drivers/dahdi/wcte11xp.c @@ -955,6 +955,18 @@ static int t1xxp_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc return 0; } +static const struct dahdi_span_ops t1xxp_span_ops = { + .startup = t1xxp_startup, + .shutdown = t1xxp_shutdown, + .rbsbits = t1xxp_rbsbits, + .maint = t1xxp_maint, + .open = t1xxp_open, + .close = t1xxp_close, + .spanconfig = t1xxp_spanconfig, + .chanconfig = t1xxp_chanconfig, + .ioctl = t1xxp_ioctl, +}; + static int t1xxp_software_init(struct t1 *wc) { int x; @@ -976,15 +988,7 @@ static int t1xxp_software_init(struct t1 *wc) dahdi_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); snprintf(wc->span.location, sizeof(wc->span.location) - 1, "PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); - wc->span.spanconfig = t1xxp_spanconfig; - wc->span.chanconfig = t1xxp_chanconfig; wc->span.irq = wc->dev->irq; - wc->span.startup = t1xxp_startup; - wc->span.shutdown = t1xxp_shutdown; - wc->span.rbsbits = t1xxp_rbsbits; - wc->span.maint = t1xxp_maint; - wc->span.open = t1xxp_open; - wc->span.close = t1xxp_close; if (wc->spantype == TYPE_E1) { if (unchannelized) wc->span.channels = 32; @@ -1001,7 +1005,6 @@ static int t1xxp_software_init(struct t1 *wc) } wc->span.chans = wc->chans; wc->span.flags = DAHDI_FLAG_RBS; - wc->span.ioctl = t1xxp_ioctl; init_waitqueue_head(&wc->span.maintq); for (x=0;x<wc->span.channels;x++) { sprintf(wc->chans[x]->name, "WCT1/%d/%d", wc->num, x + 1); @@ -1012,6 +1015,7 @@ static int t1xxp_software_init(struct t1 *wc) wc->chans[x]->pvt = wc; wc->chans[x]->chanpos = x + 1; } + wc->span.ops = &t1xxp_span_ops; if (dahdi_register(&wc->span, 0)) { printk(KERN_NOTICE "Unable to register span with DAHDI\n"); return -1; |