diff options
Diffstat (limited to 'drivers/dahdi')
-rw-r--r-- | drivers/dahdi/wct4xxp/base.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 1d1cf8e..d3d2577 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -213,6 +213,9 @@ static int altab[] = { #define CANARY 0xc0de + +#define PORTS_PER_FRAMER 4 + struct devtype { char *desc; unsigned int flags; @@ -3442,7 +3445,7 @@ static int __devinit t4_launch(struct t4 *wc) printk(KERN_INFO "TE%dXXP: Launching card: %d\n", wc->numspans, wc->order); /* Setup serial parameters and system interface */ - for (x=0;x<4;x++) + for (x=0;x<PORTS_PER_FRAMER;x++) t4_serial_setup(wc, x); if (dahdi_register(&wc->tspans[0]->span, 0)) { @@ -3604,7 +3607,7 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i #endif /* Allocate pieces we need here */ - for (x = 0; x < 4; x++) { + for (x = 0; x < PORTS_PER_FRAMER; x++) { if (!(wc->tspans[x] = kmalloc(sizeof(*wc->tspans[x]), GFP_KERNEL))) { free_wc(wc); return -ENOMEM; |