xpp: Support FXS module with 4 ports and no I/O
authorOron Peled <oron.peled@xorcom.com>
Sun, 11 Feb 2018 17:22:03 +0000 (19:22 +0200)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Thu, 10 May 2018 09:18:35 +0000 (12:18 +0300)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

drivers/dahdi/xpp/card_fxs.c

index 38f000f..03fcc3a 100644 (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;