diff options
Diffstat (limited to 'kernel/xpp/card_fxo.c')
-rw-r--r-- | kernel/xpp/card_fxo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/xpp/card_fxo.c b/kernel/xpp/card_fxo.c index bddfa0c..3ad8b7a 100644 --- a/kernel/xpp/card_fxo.c +++ b/kernel/xpp/card_fxo.c @@ -428,7 +428,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; @@ -440,9 +441,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; |