[svn-commits] sruffell: branch linux/sruffell/wctdm24xxp-cmdlist r9849 - /linux/team/sruffe...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 16 16:39:54 CDT 2011


Author: sruffell
Date: Wed Mar 16 16:39:50 2011
New Revision: 9849

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9849
Log:
wctdm24xxp: Remove modmap member from 'struct wctdm'.

We can already use the module type to determine presence of a module to
check.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c
    linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/wctdm24xxp.h

Modified: linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9849&r1=9848&r2=9849
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c Wed Mar 16 16:39:50 2011
@@ -1997,14 +1997,16 @@
 	}
 
 	for (x = 0; x < wc->mods_per_board; x++) {
-		if (wc->modmap & (1 << x)) {
-			if (wc->modtype[x] == MOD_TYPE_FXS) {
-				wctdm_isr_misc_fxs(wc, x);
-			} else if (wc->modtype[x] == MOD_TYPE_FXO) {
-				wctdm_voicedaa_check_hook(wc, x);
-			} else if (wc->modtype[x] == MOD_TYPE_QRV) {
-				wctdm_qrvdri_check_hook(wc, x);
-			}
+		switch (wc->modtype[x]) {
+		case MOD_TYPE_FXS:
+			wctdm_isr_misc_fxs(wc, x);
+			break;
+		case MOD_TYPE_FXO:
+			wctdm_voicedaa_check_hook(wc, x);
+			break;
+		case MOD_TYPE_QRV:
+			wctdm_qrvdri_check_hook(wc, x);
+			break;
 		}
 	}
 }
@@ -3357,8 +3359,6 @@
 	channo = chan->chanpos - 1;
 
 #if 0
-	if (!(wc->modmap & (1 << (chan->chanpos - 1))))
-		return -ENODEV;
 	if (wc->dead)
 		return -ENODEV;
 #endif
@@ -3892,7 +3892,6 @@
 			break;
 retry:
 		if (!(ret = wctdm_init_proslic(wc, x, 0, 0, sane))) {
-			wc->modmap |= (1 << x);
 			if (debug & DEBUG_CARD) {
 				readi = wctdm_getreg(wc,x,LOOP_I_LIMIT);
 				dev_info(&wc->vb.pdev->dev, "Proslic module %d loop current is %dmA\n", x, ((readi*3)+20));
@@ -3903,7 +3902,6 @@
 				sane = 1;
 				/* Init with Manual Calibration */
 				if (!wctdm_init_proslic(wc, x, 0, 1, sane)) {
-					wc->modmap |= (1 << x);
 
 					if (debug & DEBUG_CARD) {
 						readi = wctdm_getreg(wc, x, LOOP_I_LIMIT);
@@ -3916,17 +3914,14 @@
 				}
 
 			} else if (!(ret = wctdm_init_voicedaa(wc, x, 0, 0, sane))) {
-				wc->modmap |= (1 << x);
 				dev_info(&wc->vb.pdev->dev,
 					 "Port %d: Installed -- AUTO FXO "
 					 "(%s mode)\n", x + 1,
 					 fxo_modes[_opermode].name);
 			} else if (!wctdm_init_qrvdri(wc, x)) {
-				wc->modmap |= 1 << x;
 				dev_info(&wc->vb.pdev->dev,
 					 "Port %d: Installed -- QRV DRI card\n", x + 1);
 			} else if (is_hx8(wc) && !wctdm_init_b400m(wc, x)) {
-				wc->modmap |= (1 << x);
 				dev_info(&wc->vb.pdev->dev,
 					 "Port %d: Installed -- BRI "
 					 "quad-span module\n", x + 1);

Modified: linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/wctdm24xxp.h?view=diff&rev=9849&r1=9848&r2=9849
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/wctdm24xxp.h (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/wctdm24xxp.h Wed Mar 16 16:39:50 2011
@@ -170,7 +170,6 @@
 	int mods_per_board;			/* maximum number of modules for this board */
 	int digi_mods;				/* number of digital modules present */
 	int avchannels;				/* active "voice" (voice, B and D) channels */
-	int modmap;				/* Bit-map of present cards (1=present) */
 
 	int altcs[NUM_MODULES];
 




More information about the svn-commits mailing list