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/opvxa1200.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers/dahdi/opvxa1200.c') 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)) { -- cgit v1.2.3