xpp: Support FXS module with 4 ports and no I/O

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
Oron Peled 2018-02-11 19:22:03 +02:00 committed by Tzafrir Cohen
parent 9a4d2fce48
commit d3c9e43437
1 changed files with 1 additions and 1 deletions

View File

@ -593,7 +593,7 @@ static xpd_t *FXS_card_new(xbus_t *xbus, int unit, int subunit,
regular_channels = min(8, subunit_ports);
channels = regular_channels;
/* Calculate digital inputs/outputs */
if (unit == 0 && unit_descriptor->subtype != 4) {
if (unit == 0 && unit_descriptor->subtype != 4 && unit_descriptor->numchips != 4) {
channels += 6; /* 2 DIGITAL OUTPUTS, 4 DIGITAL INPUTS */
d_inputs = LINES_DIGI_INP;
d_outputs = LINES_DIGI_OUT;