summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/card_bri.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
commit7509135aa0a5107895179b04646265ed888e57aa (patch)
treea5a8674452a1d33e0b8e2be6770322bd4c4f62b1 /drivers/dahdi/xpp/card_bri.c
parent68af6700c39129bde7e848b6e40ecfb4b1ba74e9 (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_bri.c')
-rw-r--r--drivers/dahdi/xpp/card_bri.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dahdi/xpp/card_bri.c b/drivers/dahdi/xpp/card_bri.c
index c5b0d9e..8bf1aa6 100644
--- a/drivers/dahdi/xpp/card_bri.c
+++ b/drivers/dahdi/xpp/card_bri.c
@@ -610,11 +610,16 @@ err:
return -EINVAL;
}
-static xpd_t *BRI_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 *BRI_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 = min(3, CHANNELS_PERXPD);
+ if(subunit_ports != 1) {
+ XBUS_ERR(xbus, "Bad subunit_ports=%d\n", subunit_ports);
+ return NULL;
+ }
XBUS_DBG(GENERAL, xbus, "\n");
xpd = xpd_alloc(xbus, unit, subunit, subtype, subunits, sizeof(struct BRI_priv_data), proto_table, channels);
if(!xpd)