diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-07-26 00:30:41 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-07-26 00:30:41 +0000 |
commit | 9e8885a50b7923c9a9b7456bbf2ecc61923c8734 (patch) | |
tree | 57dc2f7e5a6c358c0a13eb4a8d0f7856b5e8077a /drivers/dahdi/wctdm.c | |
parent | 5fd3fdc1cea7af8b1c46bbf2a5edd0c6fe2d3e54 (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.c | 14 |
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"); |