summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/dahdi/dahdi_dummy.c10
-rw-r--r--drivers/dahdi/dahdi_dynamic.c20
-rw-r--r--drivers/dahdi/wcfxo.c30
-rw-r--r--drivers/dahdi/wctdm.c6
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c54
-rw-r--r--drivers/dahdi/wctdm24xxp/wctdm24xxp.h2
6 files changed, 64 insertions, 58 deletions
diff --git a/drivers/dahdi/dahdi_dummy.c b/drivers/dahdi/dahdi_dummy.c
index 8263633..8b094b9 100644
--- a/drivers/dahdi/dahdi_dummy.c
+++ b/drivers/dahdi/dahdi_dummy.c
@@ -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 void ztdummy_timer(unsigned long param)
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;
}
diff --git a/drivers/dahdi/dahdi_dynamic.c b/drivers/dahdi/dahdi_dynamic.c
index 00e0a66..c0b50b1 100644
--- a/drivers/dahdi/dahdi_dynamic.c
+++ b/drivers/dahdi/dahdi_dynamic.c
@@ -104,7 +104,7 @@ static struct dahdi_dynamic {
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 @@ static void ztd_sendmessage(struct dahdi_dynamic *z)
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 @@ static void ztd_sendmessage(struct dahdi_dynamic *z)
}
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 @@ static int create_dynamic(DAHDI_DYNAMIC_SPAN *zds)
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);
diff --git a/drivers/dahdi/wcfxo.c b/drivers/dahdi/wcfxo.c
index f369225..f9ba45d 100644
--- a/drivers/dahdi/wcfxo.c
+++ b/drivers/dahdi/wcfxo.c
@@ -139,7 +139,8 @@ struct wcfxo {
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 @@ static inline void wcfxo_transmitprep(struct wcfxo *wc, unsigned char ints)
}
/* 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 @@ static inline void wcfxo_transmitprep(struct wcfxo *wc, unsigned char ints)
/* 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 @@ static inline void wcfxo_receiveprep(struct wcfxo *wc, unsigned char ints)
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 @@ static inline void wcfxo_receiveprep(struct wcfxo *wc, unsigned char ints)
/* 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 @@ static inline void wcfxo_receiveprep(struct wcfxo *wc, unsigned char ints)
/* 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 @@ DAHDI_IRQ_HANDLER(wcfxo_interrupt)
#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 @@ DAHDI_IRQ_HANDLER(wcfxo_interrupt)
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 @@ static int wcfxo_initialize(struct wcfxo *wc)
/* 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 @@ static int wcfxo_initialize(struct wcfxo *wc)
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 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
}
ifaces[x] = wc;
+ wc->chan = &wc->_chan;
memset(wc, 0, sizeof(struct wcfxo));
wc->ioaddr = pci_resource_start(pdev, 0);
wc->dev = pdev;
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c
index a50aeff..eb6e28e 100644
--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -252,7 +252,8 @@ struct wctdm {
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 @@ static int wctdm_initialize(struct wctdm *wc)
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 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
int cardcount = 0;
ifaces[x] = wc;
+ wc->chans = wc->_chans;
memset(wc, 0, sizeof(struct wctdm));
spin_lock_init(&wc->lock);
wc->curcard = -1;
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 1e45884..aa80acf 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -675,7 +675,7 @@ static inline void wctdm_transmitprep(struct wctdm *wc, unsigned char *writechun
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 @@ static inline void wctdm_receiveprep(struct wctdm *wc, unsigned char *readchunk)
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 @@ static inline void wctdm_receiveprep(struct wctdm *wc, unsigned char *readchunk)
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 @@ static inline void wctdm_qrvdri_check_hook(struct wctdm *wc, int card)
{
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 @@ if (debug) printk("QRV channel %d rx state changed to %d\n",qrvcard,wc->qrvhook[
{
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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
#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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
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 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card)
/* 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 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card)
/* 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 @@ static int wctdm_initialize(struct wctdm *wc)
} 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 @@ static void wctdm_post_initialize(struct wctdm *wc)
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 @@ static void vpm150m_bh(struct work_struct *data)
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 @@ retry:
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);
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
index 3dedcdc..962375b 100644
--- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
+++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
@@ -266,7 +266,7 @@ struct wctdm {
#endif
#endif
struct voicebus *vb;
- struct dahdi_chan chans[NUM_CARDS];
+ struct dahdi_chan *chans[NUM_CARDS];
int initialized;
};