summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/xbus-core.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-01-30 14:11:49 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-01-30 14:11:49 +0000
commit486c84923571900ad0f99f9db04b6dad3bdcb998 (patch)
tree97f044c12a12a4d36b363ec8a5e7c655f36e4520 /drivers/dahdi/xpp/xbus-core.c
parentcb9ca13edc842637833463569d37a13c22a931d4 (diff)
xpp: prepare for phonedev refactor
* Allow having XPDs that represent a device that is not a span. * Refactor all span related data from 'struct xpd' to 'struct phonedev' * Refactor span related methods into 'phonedev->phoneops' * Refactor phone related initialization into phonedev_init()/phonedev_cleanup() Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9704 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xbus-core.c')
-rw-r--r--drivers/dahdi/xpp/xbus-core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
index ebc7cba..b0c3261 100644
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -784,7 +784,6 @@ static int new_card(xbus_t *xbus,
byte port_dir)
{
const xproto_table_t *proto_table;
- const xops_t *xops;
int i;
int subunits;
int ret = 0;
@@ -810,8 +809,7 @@ static int new_card(xbus_t *xbus,
subunits,
port_dir
);
- xops = &proto_table->xops;
- BUG_ON(!xops);
+ BUG_ON(!proto_table->phoneops);
xbus->worker.num_units += subunits - 1;
for(i = 0; i < subunits; i++) {
int subunit_ports = proto_table->ports_per_subunit;
@@ -915,7 +913,7 @@ static int xpd_initialize(xpd_t *xpd)
}
//CALL_XMETHOD(XPD_STATE, xpd->xbus, xpd, 0); /* Turn off all channels */
xpd->card_present = 1;
- CALL_XMETHOD(XPD_STATE, xpd->xbus, xpd, 1); /* Turn on all channels */
+ PHONE_METHOD(xpd, XPD_STATE)(xpd->xbus, xpd, 1); /* Turn on all channels */
if(!xpd_setstate(xpd, XPD_STATE_READY)) {
goto out;
}