[dahdi-commits] sruffell: linux/trunk r4864 - /linux/trunk/drivers/dahdi/wct4xxp/base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Sep 4 16:29:17 CDT 2008
Author: sruffell
Date: Thu Sep 4 16:29:17 2008
New Revision: 4864
URL: http://svn.digium.com/view/dahdi?view=rev&rev=4864
Log:
Remove a couple of 'magic numbers' to make it clear all the ports of the
framer should be configured.
Modified:
linux/trunk/drivers/dahdi/wct4xxp/base.c
Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=4864&r1=4863&r2=4864
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Thu Sep 4 16:29:17 2008
@@ -212,6 +212,9 @@
#define FLAG_EXPRESS (1 << 9)
#define CANARY 0xc0de
+
+
+#define PORTS_PER_FRAMER 4
struct devtype {
char *desc;
@@ -3442,7 +3445,7 @@
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 @@
#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;
More information about the dahdi-commits
mailing list