summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-07-26 00:30:41 +0000
committerShaun Ruffell <sruffell@digium.com>2010-07-26 00:30:41 +0000
commit113b9311ebca9311befbd017eb27f6a25949e6a6 (patch)
tree57dc2f7e5a6c358c0a13eb4a8d0f7856b5e8077a /drivers/dahdi/wctdm.c
parent8682c2a90bd996765326fb6477a2466b63530b73 (diff)
dahdi: Move the callbacks in dahdi_span into its own structure.
Part of preparation for adding additional callbacks to allow board drivers to advertise and support gathering pre-echocan data from hardware echocans. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8985 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm.c')
-rw-r--r--drivers/dahdi/wctdm.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c
index c9e4f51..f533726 100644
--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -2334,6 +2334,14 @@ static int wctdm_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig)
return 0;
}
+static const struct dahdi_span_ops wctdm_span_ops = {
+ .hooksig = wctdm_hooksig,
+ .open = wctdm_open,
+ .close = wctdm_close,
+ .ioctl = wctdm_ioctl,
+ .watchdog = wctdm_watchdog,
+};
+
static int wctdm_initialize(struct wctdm *wc)
{
int x;
@@ -2361,14 +2369,10 @@ static int wctdm_initialize(struct wctdm *wc)
wc->span.owner = THIS_MODULE;
wc->span.chans = wc->chans;
wc->span.channels = NUM_CARDS;
- wc->span.hooksig = wctdm_hooksig;
wc->span.irq = wc->dev->irq;
- wc->span.open = wctdm_open;
- wc->span.close = wctdm_close;
wc->span.flags = DAHDI_FLAG_RBS;
- wc->span.ioctl = wctdm_ioctl;
- wc->span.watchdog = wctdm_watchdog;
init_waitqueue_head(&wc->span.maintq);
+ wc->span.ops = &wctdm_span_ops;
if (dahdi_register(&wc->span, 0)) {
printk(KERN_NOTICE "Unable to register span with DAHDI\n");