diff options
author | Shaun Ruffell <sruffell@digium.com> | 2008-09-04 21:29:17 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2008-09-04 21:29:17 +0000 |
commit | 1bb465f6b105fb8430e6d13d736e161d57df48e2 (patch) | |
tree | d409c9b77fdf0b65d190d4ca1c760675d3c99ead | |
parent | 50aaf8d1257848014a6d381656127940a16b2853 (diff) |
Remove a couple of 'magic numbers' to make it clear all the ports of the
framer should be configured.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4864 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-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; |