From 6c8bc5060f29f556ff2a00cb2a2a7dc3beb135ee Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 8 Sep 2010 14:04:03 +0300 Subject: 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. --- drivers/dahdi/wcopenpci.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers/dahdi/wcopenpci.c') 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)) { -- cgit v1.2.3