diff options
author | Tzafrir Cohen <tzafrir@cohens.org.il> | 2010-09-08 14:04:03 +0300 |
---|---|---|
committer | Tzafrir Cohen <tzafrir@cohens.org.il> | 2010-09-12 13:10:59 +0200 |
commit | 6c8bc5060f29f556ff2a00cb2a2a7dc3beb135ee (patch) | |
tree | 53083013e40e5a2f4c56a2323a5a40028fd64ed7 /drivers/dahdi/opvxa1200.c | |
parent | db5ce0faef41095d4fbf9804031931f8e886b2a1 (diff) |
Move span callbacs to a separate structure
r8985 and r8986 moved most of the span operation callbacks from the
dahdi_span itself to a separate struct. That struct is typically allocated
statically by the driver.
Diffstat (limited to 'drivers/dahdi/opvxa1200.c')
-rw-r--r-- | drivers/dahdi/opvxa1200.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/dahdi/opvxa1200.c b/drivers/dahdi/opvxa1200.c index 77a1e02..6254c65 100644 --- a/drivers/dahdi/opvxa1200.c +++ b/drivers/dahdi/opvxa1200.c @@ -2367,6 +2367,15 @@ static int wctdm_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig) return 0; } +static const struct dahdi_span_ops wctdm_span_ops = { + .owner = THIS_MODULE, + .hooksig = wctdm_hooksig, + .open = wctdm_open, + .close = wctdm_close, + .ioctl = wctdm_ioctl, + .watchdog = wctdm_watchdog +}; + static int wctdm_initialize(struct wctdm *wc) { int x; @@ -2406,14 +2415,9 @@ static int wctdm_initialize(struct wctdm *wc) } wc->span.chans = wc->chans; wc->span.channels = wc->max_cards; /*MAX_NUM_CARDS;*/ - wc->span.hooksig = wctdm_hooksig; - wc->span.owner = THIS_MODULE; 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; + wc->span.ops = &wctdm_span_ops; init_waitqueue_head(&wc->span.maintq); if (dahdi_register(&wc->span, 0)) { |