summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/card_bri.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-07-26 00:30:41 +0000
committerShaun Ruffell <sruffell@digium.com>2010-07-26 00:30:41 +0000
commit9e8885a50b7923c9a9b7456bbf2ecc61923c8734 (patch)
tree57dc2f7e5a6c358c0a13eb4a8d0f7856b5e8077a /drivers/dahdi/xpp/card_bri.c
parent5fd3fdc1cea7af8b1c46bbf2a5edd0c6fe2d3e54 (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/xpp/card_bri.c')
-rw-r--r--drivers/dahdi/xpp/card_bri.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/drivers/dahdi/xpp/card_bri.c b/drivers/dahdi/xpp/card_bri.c
index b390bf7..e15f064 100644
--- a/drivers/dahdi/xpp/card_bri.c
+++ b/drivers/dahdi/xpp/card_bri.c
@@ -861,6 +861,27 @@ static int BRI_card_remove(xbus_t *xbus, xpd_t *xpd)
return 0;
}
+static const struct dahdi_span_ops BRI_span_ops = {
+ .spanconfig = bri_spanconfig,
+ .chanconfig = bri_chanconfig,
+ .startup = bri_startup,
+ .shutdown = bri_shutdown,
+#ifndef CONFIG_DAHDI_BRI_DCHANS
+ .hdlc_hard_xmit = bri_hdlc_hard_xmit,
+#endif
+ .open = xpp_open,
+ .close = xpp_close,
+ .hooksig = xpp_hooksig, /* Only with RBS bits */
+ .ioctl = xpp_ioctl,
+ .maint = xpp_maint,
+#ifdef DAHDI_SYNC_TICK
+ .sync_tick = dahdi_sync_tick,
+#endif
+#ifdef CONFIG_DAHDI_WATCHDOG
+ .watchdog = xpp_watchdog,
+#endif
+};
+
static int BRI_card_dahdi_preregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
@@ -912,13 +933,7 @@ static int BRI_card_dahdi_preregistration(xpd_t *xpd, bool on)
}
}
CALL_XMETHOD(card_pcm_recompute, xbus, xpd, 0);
- xpd->span.spanconfig = bri_spanconfig;
- xpd->span.chanconfig = bri_chanconfig;
- xpd->span.startup = bri_startup;
- xpd->span.shutdown = bri_shutdown;
-#ifndef CONFIG_DAHDI_BRI_DCHANS
- xpd->span.hdlc_hard_xmit = bri_hdlc_hard_xmit;
-#endif
+ xpd->span.ops = &BRI_span_ops;
return 0;
}