[svn-commits] kpfleming: linux/trunk r4514 - in /linux/trunk/drivers/dahdi: ./ wctdm24xxp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 2 09:05:58 CDT 2008


Author: kpfleming
Date: Wed Jul  2 09:05:57 2008
New Revision: 4514

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4514
Log:
fix remaining drivers broken by pointer type change in 'struct dahdi_span'... wctdm24xxp still broken, will fix in a couple of hours


Modified:
    linux/trunk/drivers/dahdi/dahdi_dummy.c
    linux/trunk/drivers/dahdi/dahdi_dynamic.c
    linux/trunk/drivers/dahdi/wcfxo.c
    linux/trunk/drivers/dahdi/wctdm.c
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h

Modified: linux/trunk/drivers/dahdi/dahdi_dummy.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dummy.c?view=diff&rev=4514&r1=4513&r2=4514
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dummy.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dummy.c Wed Jul  2 09:05:57 2008
@@ -93,7 +93,8 @@
 
 struct ztdummy {
 	struct dahdi_span span;
-	struct dahdi_chan chan;
+	struct dahdi_chan _chan;
+	struct dahdi_chan *chan;
 	unsigned int counter;
 #ifdef USE_RTC
 	spinlock_t rtclock;
@@ -223,17 +224,18 @@
 static int ztdummy_initialize(struct ztdummy *ztd)
 {
 	/* DAHDI stuff */
+	ztd->chan = &ztd->_chan;
 	sprintf(ztd->span.name, "DAHDI_DUMMY/1");
 	snprintf(ztd->span.desc, sizeof(ztd->span.desc) - 1, "%s (source: " CLOCK_SRC ") %d", ztd->span.name, 1);
-	sprintf(ztd->chan.name, "DAHDI_DUMMY/%d/%d", 1, 0);
+	sprintf(ztd->chan->name, "DAHDI_DUMMY/%d/%d", 1, 0);
 	dahdi_copy_string(ztd->span.devicetype, "DAHDI Dummy Timing Driver", sizeof(ztd->span.devicetype));
-	ztd->chan.chanpos = 1;
+	ztd->chan->chanpos = 1;
 	ztd->span.chans = &ztd->chan;
 	ztd->span.channels = 0;		/* no channels on our span */
 	ztd->span.deflaw = DAHDI_LAW_MULAW;
 	init_waitqueue_head(&ztd->span.maintq);
 	ztd->span.pvt = ztd;
-	ztd->chan.pvt = ztd;
+	ztd->chan->pvt = ztd;
 	if (dahdi_register(&ztd->span, 0)) {
 		return -1;
 	}

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic.c?view=diff&rev=4514&r1=4513&r2=4514
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic.c Wed Jul  2 09:05:57 2008
@@ -104,7 +104,7 @@
 	unsigned short txcnt;
 	unsigned short rxcnt;
 	struct dahdi_span span;
-	struct dahdi_chan *chans;
+	struct dahdi_chan **chans;
 	struct dahdi_dynamic *next;
 	struct dahdi_dynamic_driver *driver;
 	void *pvt;
@@ -196,7 +196,7 @@
 	offset = 0;
 	for (x=0;x<z->span.channels;x++) {
 		offset = x % 4;
-		bits |= (z->chans[x].txsig & 0xf) << (offset << 2);
+		bits |= (z->chans[x]->txsig & 0xf) << (offset << 2);
 		if (offset == 3) {
 			/* Write the bits when we have four channels */
 			*((unsigned short *)buf) = htons(bits);
@@ -214,7 +214,7 @@
 	}
 	
 	for (x=0;x<z->span.channels;x++) {
-		memcpy(buf, z->chans[x].writechunk, DAHDI_CHUNKSIZE);
+		memcpy(buf, z->chans[x]->writechunk, DAHDI_CHUNKSIZE);
 		buf += DAHDI_CHUNKSIZE;
 		msglen += DAHDI_CHUNKSIZE;
 	}
@@ -611,13 +611,13 @@
 	z->span.close = ztd_close;
 	z->span.chanconfig = ztd_chanconfig;
 	for (x=0;x<zds->numchans;x++) {
-		sprintf(z->chans[x].name, "ZTD/%s/%s/%d", zds->driver, zds->addr, x+1);
-		z->chans[x].sigcap = DAHDI_SIG_EM | DAHDI_SIG_CLEAR | DAHDI_SIG_FXSLS |
-				     DAHDI_SIG_FXSKS | DAHDI_SIG_FXSGS | DAHDI_SIG_FXOLS |
-				     DAHDI_SIG_FXOKS | DAHDI_SIG_FXOGS | DAHDI_SIG_SF | 
-				     DAHDI_SIG_DACS_RBS | DAHDI_SIG_CAS;
-		z->chans[x].chanpos = x + 1;
-		z->chans[x].pvt = z;
+		sprintf(z->chans[x]->name, "ZTD/%s/%s/%d", zds->driver, zds->addr, x+1);
+		z->chans[x]->sigcap = DAHDI_SIG_EM | DAHDI_SIG_CLEAR | DAHDI_SIG_FXSLS |
+				      DAHDI_SIG_FXSKS | DAHDI_SIG_FXSGS | DAHDI_SIG_FXOLS |
+				      DAHDI_SIG_FXOKS | DAHDI_SIG_FXOGS | DAHDI_SIG_SF | 
+				      DAHDI_SIG_DACS_RBS | DAHDI_SIG_CAS;
+		z->chans[x]->chanpos = x + 1;
+		z->chans[x]->pvt = z;
 	}
 	
 	spin_lock_irqsave(&dlock, flags);

Modified: linux/trunk/drivers/dahdi/wcfxo.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcfxo.c?view=diff&rev=4514&r1=4513&r2=4514
==============================================================================
--- linux/trunk/drivers/dahdi/wcfxo.c (original)
+++ linux/trunk/drivers/dahdi/wcfxo.c Wed Jul  2 09:05:57 2008
@@ -139,7 +139,8 @@
 	struct pci_dev *dev;
 	char *variety;
 	struct dahdi_span span;
-	struct dahdi_chan chan;
+	struct dahdi_chan _chan;
+	struct dahdi_chan *chan;
 	int usecount;
 	int dead;
 	int pos;
@@ -257,7 +258,7 @@
 	}
 
 	/* Remember what it was we just sent */
-	memcpy(wc->lasttx, wc->chan.writechunk, DAHDI_CHUNKSIZE);
+	memcpy(wc->lasttx, wc->chan->writechunk, DAHDI_CHUNKSIZE);
 
 	if (ints & 0x01)  {
 		/* Write is at interrupt address.  Start writing from normal offset */
@@ -272,11 +273,11 @@
 		/* Send a sample, as a 32-bit word, and be sure to indicate that a command follows */
 		if (wc->flags & FLAG_INVERTSER)
 			writechunk[x << 1] = cpu_to_le32(
-				~((unsigned short)(DAHDI_XLAW(wc->chan.writechunk[x], (&wc->chan)))| 0x1) << 16
+				~((unsigned short)(DAHDI_XLAW(wc->chan->writechunk[x], wc->chan))| 0x1) << 16
 				);
 		else
 			writechunk[x << 1] = cpu_to_le32(
-				((unsigned short)(DAHDI_XLAW(wc->chan.writechunk[x], (&wc->chan)))| 0x1) << 16
+				((unsigned short)(DAHDI_XLAW(wc->chan->writechunk[x], wc->chan))| 0x1) << 16
 				);
 
 		/* We always have a command to follow our signal */
@@ -374,7 +375,7 @@
 			wc->pegtimer = 0;
 			wc->peg = -1;
 		}
-		wc->chan.readchunk[x] = DAHDI_LIN2X((sample), (&wc->chan));
+		wc->chan->readchunk[x] = DAHDI_LIN2X((sample), (wc->chan));
 	}
 	if (wc->pegtimer > PEGTIME) {
 		/* Reset pegcount if our timer expires */
@@ -388,14 +389,14 @@
 			/* It's ringing */
 			if (debug)
 				printk("RING!\n");
-			dahdi_hooksig(&wc->chan, DAHDI_RXSIG_RING);
+			dahdi_hooksig(wc->chan, DAHDI_RXSIG_RING);
 			wc->ring = 1;
 		}
 		if (wc->ring && !wc->pegcount) {
 			/* No more ring */
 			if (debug)
 				printk("NO RING!\n");
-			dahdi_hooksig(&wc->chan, DAHDI_RXSIG_OFFHOOK);
+			dahdi_hooksig(wc->chan, DAHDI_RXSIG_OFFHOOK);
 			wc->ring = 0;
 		}
 	}
@@ -404,7 +405,7 @@
 
 	/* Do the echo cancellation...  We are echo cancelling against
 	   what we sent two chunks ago*/
-	dahdi_ec_chunk(&wc->chan, wc->chan.readchunk, wc->lasttx);
+	dahdi_ec_chunk(wc->chan, wc->chan->readchunk, wc->lasttx);
 
 	/* Receive the result */
 	dahdi_receive(&wc->span);
@@ -497,7 +498,7 @@
 #endif
 				}
 #else
-				dahdi_hooksig(&wc->chan, DAHDI_RXSIG_ONHOOK);
+				dahdi_hooksig(wc->chan, DAHDI_RXSIG_ONHOOK);
 #endif
 				wc->battdebounce = BATT_DEBOUNCE;
 			} else if (!wc->battery)
@@ -522,7 +523,7 @@
 						printk("Signalled Off Hook\n");
 				}
 #else
-				dahdi_hooksig(&wc->chan, DAHDI_RXSIG_OFFHOOK);
+				dahdi_hooksig(wc->chan, DAHDI_RXSIG_OFFHOOK);
 #endif
 				wc->battery = 1;
 				wc->nobatttimer = 0;
@@ -639,13 +640,13 @@
 	/* DAHDI stuff */
 	sprintf(wc->span.name, "WCFXO/%d", wc->pos);
 	snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Board %d", wc->variety, wc->pos + 1);
-	sprintf(wc->chan.name, "WCFXO/%d/%d", wc->pos, 0);
+	sprintf(wc->chan->name, "WCFXO/%d/%d", wc->pos, 0);
 	snprintf(wc->span.location, sizeof(wc->span.location) - 1,
 		 "PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1);
 	wc->span.manufacturer = "Digium";
 	dahdi_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype));
-	wc->chan.sigcap = DAHDI_SIG_FXSKS | DAHDI_SIG_FXSLS | DAHDI_SIG_SF;
-	wc->chan.chanpos = 1;
+	wc->chan->sigcap = DAHDI_SIG_FXSKS | DAHDI_SIG_FXSLS | DAHDI_SIG_SF;
+	wc->chan->chanpos = 1;
 	wc->span.chans = &wc->chan;
 	wc->span.channels = 1;
 	wc->span.hooksig = wcfxo_hooksig;
@@ -661,7 +662,7 @@
 	init_waitqueue_head(&wc->span.maintq);
 
 	wc->span.pvt = wc;
-	wc->chan.pvt = wc;
+	wc->chan->pvt = wc;
 	if (dahdi_register(&wc->span, 0)) {
 		printk("Unable to register span with DAHDI\n");
 		return -1;
@@ -902,6 +903,7 @@
 	}
 
 	ifaces[x] = wc;
+	wc->chan = &wc->_chan;
 	memset(wc, 0, sizeof(struct wcfxo));
 	wc->ioaddr = pci_resource_start(pdev, 0);
 	wc->dev = pdev;

Modified: linux/trunk/drivers/dahdi/wctdm.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm.c?view=diff&rev=4514&r1=4513&r2=4514
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm.c (original)
+++ linux/trunk/drivers/dahdi/wctdm.c Wed Jul  2 09:05:57 2008
@@ -252,7 +252,8 @@
 	dma_addr_t	writedma;
 	volatile unsigned int *writechunk;				/* Double-word aligned write memory */
 	volatile unsigned int *readchunk;				/* Double-word aligned read memory */
-	struct dahdi_chan chans[NUM_CARDS];
+	struct dahdi_chan _chans[NUM_CARDS];
+	struct dahdi_chan *chans;
 };
 
 
@@ -2030,7 +2031,7 @@
 		wc->chans[x].chanpos = x+1;
 		wc->chans[x].pvt = wc;
 	}
-	wc->span.chans = wc->chans;
+	wc->span.chans = &wc->chans;
 	wc->span.channels = NUM_CARDS;
 	wc->span.hooksig = wctdm_hooksig;
 	wc->span.irq = wc->dev->irq;
@@ -2261,6 +2262,7 @@
 			int cardcount = 0;
 
 			ifaces[x] = wc;
+			wc->chans = wc->_chans;
 			memset(wc, 0, sizeof(struct wctdm));
 			spin_lock_init(&wc->lock);
 			wc->curcard = -1;

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=4514&r1=4513&r2=4514
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Wed Jul  2 09:05:57 2008
@@ -675,7 +675,7 @@
 
 			if (likely(wc->initialized)) {
 				if (y < wc->type)
-					writechunk[y] = wc->chans[y].writechunk[x];
+					writechunk[y] = wc->chans[y]->writechunk[x];
 			}
 			cmd_dequeue(wc, writechunk, y, x);
 		}
@@ -859,7 +859,7 @@
 		for (y=0;y < wc->cards;y++) {
 			if (likely(wc->initialized)) {
 				if (y < wc->type) {
-					wc->chans[y].readchunk[x] = readchunk[y];
+					wc->chans[y]->readchunk[x] = readchunk[y];
 				}
 			}	
 			cmd_decifer(wc, readchunk, y);
@@ -878,7 +878,7 @@
 	if (likely(wc->initialized)) {
 		for (x=0;x<wc->type;x++) {
 			if (wc->cardflag & (1 << x))
-				dahdi_ec_chunk(&wc->chans[x], wc->chans[x].readchunk, wc->chans[x].writechunk);
+				dahdi_ec_chunk(wc->chans[x], wc->chans[x]->readchunk, wc->chans[x]->writechunk);
 		}
 		dahdi_receive(&wc->span);
 	}
@@ -1101,7 +1101,7 @@
 	{
 		b1 = wc->qrvhook[qrvcard + 2];
 if (debug) printk("QRV channel %d rx state changed to %d\n",qrvcard,wc->qrvhook[qrvcard + 2]);
-		dahdi_hooksig(&wc->chans[qrvcard], 
+		dahdi_hooksig(wc->chans[qrvcard], 
 			(b1) ? DAHDI_RXSIG_OFFHOOK : DAHDI_RXSIG_ONHOOK);
 		wc->qrvdebtime[card] = 0;
 	}
@@ -1115,7 +1115,7 @@
 	{
 		b1 = wc->qrvhook[qrvcard + 3];
 if (debug) printk("QRV channel %d rx state changed to %d\n",qrvcard + 1,wc->qrvhook[qrvcard + 3]);
-		dahdi_hooksig(&wc->chans[qrvcard + 1], 
+		dahdi_hooksig(wc->chans[qrvcard + 1], 
 			(b1) ? DAHDI_RXSIG_OFFHOOK : DAHDI_RXSIG_ONHOOK);
 		wc->qrvdebtime[card] = 0;
 	}
@@ -1149,7 +1149,7 @@
 						fxo->wasringing = 1;
 						if (debug)
 							printk("RING on %d/%d!\n", wc->span.spanno, card + 1);
-						dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_RING);
+						dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_RING);
 					}
 					fxo->lastrdtx = res;
 					fxo->ringdebounce = 10;
@@ -1158,7 +1158,7 @@
 						fxo->wasringing = 0;
 						if (debug)
 							printk("NO RING on %d/%d!\n", wc->span.spanno, card + 1);
-						dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK);
+						dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
 					}
 				}
 			} else if (res && (fxo->battery == BATTERY_PRESENT)) {
@@ -1172,7 +1172,7 @@
 				if (fxo->ringdebounce >= DAHDI_CHUNKSIZE * ringdebounce) {
 					if (!fxo->wasringing) {
 						fxo->wasringing = 1;
-						dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_RING);
+						dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_RING);
 						if (debug)
 							printk("RING on %d/%d!\n", wc->span.spanno, card + 1);
 					}
@@ -1183,7 +1183,7 @@
 				if (fxo->ringdebounce <= 0) {
 					if (fxo->wasringing) {
 						fxo->wasringing = 0;
-						dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK);
+						dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
 						if (debug)
 							printk("NO RING on %d/%d!\n", wc->span.spanno, card + 1);
 					}
@@ -1234,7 +1234,7 @@
 #endif
 					}
 #else
-					dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_ONHOOK);
+					dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_ONHOOK);
 					/* set the alarm timer, taking into account that part of its time
 					   period has already passed while debouncing occurred */
 					fxo->battalarm = (battalarm - battdebounce) / MS_PER_CHECK_HOOK;
@@ -1275,7 +1275,7 @@
 							printk("Signalled Off Hook\n");
 					}
 #else
-					dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK);
+					dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
 #endif
 					/* set the alarm timer, taking into account that part of its time
 					   period has already passed while debouncing occurred */
@@ -1305,7 +1305,7 @@
 		if (--fxo->battalarm == 0) {
 			/* the alarm timer has expired, so update the battery alarm state
 			   for this channel */
-			dahdi_alarm_channel(&wc->chans[card], fxo->battery ? DAHDI_ALARM_NONE : DAHDI_ALARM_RED);
+			dahdi_alarm_channel(wc->chans[card], fxo->battery ? DAHDI_ALARM_NONE : DAHDI_ALARM_RED);
 		}
 	}
 
@@ -1318,7 +1318,7 @@
 				       fxo->polarity, 
 				       fxo->lastpol);
 			if (fxo->polarity)
-				dahdi_qevent_lock(&wc->chans[card], DAHDI_EVENT_POLARITY);
+				dahdi_qevent_lock(wc->chans[card], DAHDI_EVENT_POLARITY);
 			fxo->polarity = fxo->lastpol;
 		    }
 		}
@@ -1359,7 +1359,7 @@
 				/* Off hook */
 				if (debug & DEBUG_CARD)
 					printk("wctdm: Card %d Going off hook\n", card);
-				dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK);
+				dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
 				if (robust)
 					wctdm_init_proslic(wc, card, 1, 0, 1);
 				wc->mods[card].fxs.oldrxhook = 1;
@@ -1368,7 +1368,7 @@
 				/* On hook */
 				if (debug & DEBUG_CARD)
 					printk("wctdm: Card %d Going on hook\n", card);
-				dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_ONHOOK);
+				dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_ONHOOK);
 				wc->mods[card].fxs.oldrxhook = 0;
 			}
 		}
@@ -2845,11 +2845,11 @@
 	} else
 		wc->span.deflaw = DAHDI_LAW_MULAW;
 	for (x=0;x<wc->cards;x++) {
-		sprintf(wc->chans[x].name, "WCTDM/%d/%d", wc->pos, x);
-		wc->chans[x].sigcap = DAHDI_SIG_FXOKS | DAHDI_SIG_FXOLS | DAHDI_SIG_FXOGS | DAHDI_SIG_SF | DAHDI_SIG_EM | DAHDI_SIG_CLEAR;
-		wc->chans[x].sigcap |= DAHDI_SIG_FXSKS | DAHDI_SIG_FXSLS | DAHDI_SIG_SF | DAHDI_SIG_CLEAR;
-		wc->chans[x].chanpos = x+1;
-		wc->chans[x].pvt = wc;
+		sprintf(wc->chans[x]->name, "WCTDM/%d/%d", wc->pos, x);
+		wc->chans[x]->sigcap = DAHDI_SIG_FXOKS | DAHDI_SIG_FXOLS | DAHDI_SIG_FXOGS | DAHDI_SIG_SF | DAHDI_SIG_EM | DAHDI_SIG_CLEAR;
+		wc->chans[x]->sigcap |= DAHDI_SIG_FXSKS | DAHDI_SIG_FXSLS | DAHDI_SIG_SF | DAHDI_SIG_CLEAR;
+		wc->chans[x]->chanpos = x+1;
+		wc->chans[x]->pvt = wc;
 	}
 	wc->span.chans = wc->chans;
 	wc->span.channels = wc->type;
@@ -2878,13 +2878,13 @@
 	for (x = 0; x <wc->cards; x++) {
 		if (wc->cardflag & (1 << x)) {
 			if (wc->modtype[x] == MOD_TYPE_FXO)
-				wc->chans[x].sigcap = DAHDI_SIG_FXSKS | DAHDI_SIG_FXSLS | DAHDI_SIG_SF | DAHDI_SIG_CLEAR;
+				wc->chans[x]->sigcap = DAHDI_SIG_FXSKS | DAHDI_SIG_FXSLS | DAHDI_SIG_SF | DAHDI_SIG_CLEAR;
 			else if (wc->modtype[x] == MOD_TYPE_FXS)
-				wc->chans[x].sigcap = DAHDI_SIG_FXOKS | DAHDI_SIG_FXOLS | DAHDI_SIG_FXOGS | DAHDI_SIG_SF | DAHDI_SIG_EM | DAHDI_SIG_CLEAR;
+				wc->chans[x]->sigcap = DAHDI_SIG_FXOKS | DAHDI_SIG_FXOLS | DAHDI_SIG_FXOGS | DAHDI_SIG_SF | DAHDI_SIG_EM | DAHDI_SIG_CLEAR;
 			else if (wc->modtype[x] == MOD_TYPE_QRV)
-				wc->chans[x].sigcap = DAHDI_SIG_SF | DAHDI_SIG_EM | DAHDI_SIG_CLEAR;
-		} else if (!(wc->chans[x].sigcap & DAHDI_SIG_BROKEN)) {
-			wc->chans[x].sigcap = 0;
+				wc->chans[x]->sigcap = DAHDI_SIG_SF | DAHDI_SIG_EM | DAHDI_SIG_CLEAR;
+		} else if (!(wc->chans[x]->sigcap & DAHDI_SIG_BROKEN)) {
+			wc->chans[x]->sigcap = 0;
 		}
 	}
 
@@ -3033,7 +3033,7 @@
 					printk("Channel %d: Detected DTMF tone %d of duration %d!!!\n", channel + 1, tone, duration);
 
 				if (test_bit(channel, &wc->dtmfmask) && (eventdata.toneEvent.ToneDuration > 0)) {
-					struct dahdi_chan *chan = &wc->chans[channel];
+					struct dahdi_chan *chan = wc->chans[channel];
 
 					if ((tone != EndofMFDigit) && (zaptone != 0)) {
 						vpm150m->curtone[channel] = tone;
@@ -3671,7 +3671,7 @@
 					printk("Port %d: Installed -- MANUAL FXS\n",x + 1);
 				} else {
 					printk("Port %d: FAILED FXS (%s)\n", x + 1, fxshonormode ? fxo_modes[_opermode].name : "FCC");
-					wc->chans[x].sigcap = DAHDI_SIG_BROKEN | __DAHDI_SIG_FXO;
+					wc->chans[x]->sigcap = DAHDI_SIG_BROKEN | __DAHDI_SIG_FXO;
 				} 
 			} else if (!(ret = wctdm_init_voicedaa(wc, x, 0, 0, sane))) {
 				wc->cardflag |= (1 << x);

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h?view=diff&rev=4514&r1=4513&r2=4514
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h Wed Jul  2 09:05:57 2008
@@ -266,7 +266,7 @@
 #endif	
 #endif
 	struct voicebus *vb;
-	struct dahdi_chan chans[NUM_CARDS];
+	struct dahdi_chan *chans[NUM_CARDS];
 	int initialized;
 };
 




More information about the svn-commits mailing list