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/wcopenpci.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/wcopenpci.c')
-rw-r--r-- | drivers/dahdi/wcopenpci.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/dahdi/wcopenpci.c b/drivers/dahdi/wcopenpci.c index 9e28279..e5567ca 100644 --- a/drivers/dahdi/wcopenpci.c +++ b/drivers/dahdi/wcopenpci.c @@ -1295,6 +1295,15 @@ static int openpci_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig) return 0; } //}}} +static const struct dahdi_span_ops openpci_span_ops = { + .owner = THIS_MODULE, + .hooksig = openpci_hooksig, + .open = openpci_open, + .close = openpci_close, + .ioctl = openpci_ioctl, + .watchdog = openpci_watchdog +}; + static int span_initialize(struct openpci *wc) { //{{{ int x; @@ -1316,13 +1325,8 @@ static int span_initialize(struct openpci *wc) wc->span.deflaw = DAHDI_LAW_MULAW; wc->span.chans = wc->chans; wc->span.channels = MAX_PORTS; - wc->span.hooksig = openpci_hooksig; - wc->span.owner = THIS_MODULE; - wc->span.open = openpci_open; - wc->span.close = openpci_close; wc->span.flags = DAHDI_FLAG_RBS; - wc->span.ioctl = openpci_ioctl; - wc->span.watchdog = openpci_watchdog; + wc->span.ops = &openpci_span_ops; init_waitqueue_head(&wc->span.maintq); if (dahdi_register(&wc->span, 0)) { |