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

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


Author: sruffell
Date: Wed Mar 16 16:40:31 2011
New Revision: 9857

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9857
Log:
wctdm24xxp: Drop 'flags' from 'struct wctdm_module'.

The voicebus cards only support the S110M FXS modules which are based on
the 3215. The module flags member was only used to hold whether we were
dealing with a 3210 or 3215 SLIC, so we can drop it since we always know
we'll have a 3215 based SLIC.

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=9857&r1=9856&r2=9857
==============================================================================
--- 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:40:31 2011
@@ -1202,12 +1202,11 @@
 			      unsigned char address, unsigned short data)
 {
 	int res = -1;
-	/* Translate 3215 addresses */
-	if (mod->flags & FLAG_3215) {
-		address = translate_3215(address);
-		if (address == 255)
-			return 0;
-	}
+
+	address = translate_3215(address);
+	if (address == 255)
+		return 0;
+
 	if (!wait_access(wc, mod)) {
 		wctdm_setreg(wc, mod, IDA_LO, (u8)(data & 0xFF));
 		wctdm_setreg(wc, mod, IDA_HI, (u8)((data & 0xFF00)>>8));
@@ -1223,12 +1222,11 @@
 { 
 	int res = -1;
 	char *p=NULL;
-	/* Translate 3215 addresses */
-	if (mod->flags & FLAG_3215) {
-		address = translate_3215(address);
-		if (address == 255)
-			return 0;
-	}
+
+	address = translate_3215(address);
+	if (address == 255)
+		return 0;
+
 	if (!wait_access(wc, mod)) {
 		wctdm_setreg(wc, mod, IAA, address);
 		if (!wait_access(wc, mod)) {
@@ -1276,8 +1274,7 @@
 		}
 		initial = indirect_regs[i].initial;
 
-		if ((j != initial) && (!(mod->flags & FLAG_3215) ||
-		    (indirect_regs[i].altaddr != 255))) {
+		if ((j != initial) && (indirect_regs[i].altaddr != 255)) {
 			dev_notice(&wc->vb.pdev->dev,
 				   "!!!!!!! %s  iREG %X = %X  should be %X\n",
 				   indirect_regs[i].name,
@@ -2198,16 +2195,6 @@
 		}
 		return -1;
 	}
-
-	if ((blah & 0xf) < 2) {
-		dev_info(&wc->vb.pdev->dev,
-			 "ProSLIC 3210 version %d is too old\n", blah & 0xf);
-		return -1;
-	}
-
-	if (wctdm_getreg(wc, mod, 1) & 0x80)
-		/* ProSLIC 3215, not a 3210 */
-		mod->flags |= FLAG_3215;
 
 	blah = wctdm_getreg(wc, mod, 8);
 	if (blah != 0x2) {
@@ -3935,7 +3922,7 @@
 	snprintf(s->span.desc, sizeof(s->span.desc) - 1, "%s Board %d", wc->desc->name, wc->pos + 1);
 	snprintf(s->span.location, sizeof(s->span.location) - 1,
 		 "PCI%s Bus %02d Slot %02d",
-		 (wc->mods[0].flags & FLAG_EXPRESS) ? " Express" : "",
+		 (wc->desc->flags & FLAG_EXPRESS) ? " Express" : "",
 		 pdev->bus->number, PCI_SLOT(pdev->devfn) + 1);
 	s->span.manufacturer = "Digium";
 	strncpy(s->span.devicetype, wc->desc->name, sizeof(s->span.devicetype) - 1);
@@ -4902,7 +4889,6 @@
 		wc->companding = DAHDI_LAW_DEFAULT;
 
 	for (i = 0; i < NUM_MODULES; i++) {
-		wc->mods[i].flags = wc->desc->flags;
 		wc->mods[i].dacssrc = -1;
 		wc->mods[i].card = i;
 	}

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=9857&r1=9856&r2=9857
==============================================================================
--- 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:40:31 2011
@@ -50,8 +50,7 @@
 
 #define OHT_TIMER		6000	/* How long after RING to retain OHT */
 
-#define FLAG_3215	(1 << 0)
-#define FLAG_EXPRESS	(1 << 1)
+#define FLAG_EXPRESS	(1 << 0)
 
 #define EFRAME_SIZE 108L
 #define EFRAME_GAP 20L
@@ -228,7 +227,6 @@
 	enum module_type type;
 	int sethook; /* pending hook state command */
 	int dacssrc;
-	int flags;   /* bitmap of board-specific + module-specific flags */
 
 	int altcs;
 	u8 card;




More information about the svn-commits mailing list