summaryrefslogtreecommitdiff
path: root/kernel/xpp/card_pri.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/xpp/card_pri.c')
-rw-r--r--kernel/xpp/card_pri.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/xpp/card_pri.c b/kernel/xpp/card_pri.c
index a8eef64..8760cf8 100644
--- a/kernel/xpp/card_pri.c
+++ b/kernel/xpp/card_pri.c
@@ -661,7 +661,7 @@ static void set_reg_lim0(const char *msg, xpd_t *xpd)
}
/*
- * Normally set by the timing parameter in zaptel.conf
+ * Normally set by the timing parameter in /etc/zaptel.conf
* If this is called by ztcfg, than it's too late to change
* zaptel sync priority (we are already registered)
*
@@ -909,12 +909,17 @@ static int pri_chanconfig(struct zt_chan *chan, int sigtype)
return 0;
}
-static xpd_t *PRI_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 *PRI_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;
struct PRI_priv_data *priv;
int channels = min(31, CHANNELS_PERXPD); /* worst case */
+ 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 PRI_priv_data), proto_table, channels);
if(!xpd)