summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/card_fxo.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-04-20 10:26:35 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-04-20 10:26:35 +0000
commit5af88c77e19a108eb1fe9144d157d72e03551309 (patch)
treea5a8674452a1d33e0b8e2be6770322bd4c4f62b1 /drivers/dahdi/xpp/card_fxo.c
parent104115d00a132f3cb751991af70a1d90fdd98fe8 (diff)
xpp: Do use information about number of ports the Astribank provides
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6408 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/card_fxo.c')
-rw-r--r--drivers/dahdi/xpp/card_fxo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c
index 93b5f5b..79b7ce2 100644
--- a/drivers/dahdi/xpp/card_fxo.c
+++ b/drivers/dahdi/xpp/card_fxo.c
@@ -422,7 +422,8 @@ err:
return -EINVAL;
}
-static xpd_t *FXO_card_new(xbus_t *xbus, int unit, int subunit, const xproto_table_t *proto_table, byte subtype, int subunits, bool to_phone)
+static xpd_t *FXO_card_new(xbus_t *xbus, int unit, int subunit, const xproto_table_t *proto_table,
+ byte subtype, int subunits, int subunit_ports, bool to_phone)
{
xpd_t *xpd = NULL;
int channels;
@@ -434,9 +435,9 @@ static xpd_t *FXO_card_new(xbus_t *xbus, int unit, int subunit, const xproto_tab
return NULL;
}
if(subtype == 2)
- channels = min(2, CHANNELS_PERXPD);
+ channels = min(2, subunit_ports);
else
- channels = min(8, CHANNELS_PERXPD);
+ channels = min(8, subunit_ports);
xpd = xpd_alloc(xbus, unit, subunit, subtype, subunits, sizeof(struct FXO_priv_data), proto_table, channels);
if(!xpd)
return NULL;