summaryrefslogtreecommitdiff
path: root/wctc4xxp
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-02-01 20:17:23 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-02-01 20:17:23 +0000
commitb2af10d896f48ec605ada4af4df70f53bca6badb (patch)
treecb33562d0111d965cee0aae1088ff2be7b794433 /wctc4xxp
parent13179eb2fc4b2384550a1681513986584634bfd6 (diff)
revert some code that appears to be causing crashes
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2078 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctc4xxp')
-rw-r--r--wctc4xxp/base.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/wctc4xxp/base.c b/wctc4xxp/base.c
index c98f2d3..f42c577 100644
--- a/wctc4xxp/base.c
+++ b/wctc4xxp/base.c
@@ -626,7 +626,7 @@ static int dte_operation(struct zt_transcoder_channel *ztc, int op)
switch (op) {
case ZT_TCOP_ALLOCATE:
- if (ztc->chan_built)
+ if (ztc->flags.chan_built)
break;
down(&wc->chansem);
if (st->encoder)
@@ -638,7 +638,7 @@ static int dte_operation(struct zt_transcoder_channel *ztc, int op)
st->timeslot_out_num, st->timeslot_in_num, &(st->chan_out_num),
&(st->chan_in_num));
/* Mark this channel as built */
- ztc->chan_built = 1;
+ ztc->flags.chan_built = 1;
ztc->built_fmts = zth->dstfmt | zth->srcfmt;
/* Mark the channel complement (other half of encoder/decoder pair) as built */
@@ -646,7 +646,7 @@ static int dte_operation(struct zt_transcoder_channel *ztc, int op)
compl_ztc = &(wc->udecode->channels[st->timeslot_in_num >> 1]);
else
compl_ztc = &(wc->uencode->channels[st->timeslot_in_num >> 1]);
- compl_ztc->chan_built = 1;
+ compl_ztc->flags.chan_built = 1;
compl_ztc->built_fmts = zth->dstfmt | zth->srcfmt;
compl_st = compl_ztc->pvt;
compl_st->chan_in_num = st->chan_out_num;
@@ -662,20 +662,20 @@ static int dte_operation(struct zt_transcoder_channel *ztc, int op)
compl_ztc = &(wc->uencode->channels[st->timeslot_in_num >> 1]);
/* If the channel complement (other half of the encoder/decoder pair) is not being used... */
- if (!compl_ztc->busy) {
+ if (!compl_ztc->flags.busy) {
if (st->encoder)
destroy_channel(wc, st->chan_in_num, st->chan_out_num);
else
destroy_channel(wc, st->chan_out_num, st->chan_in_num);
/* Mark this channel as not built */
- ztc->chan_built = 0;
+ ztc->flags.chan_built = 0;
ztc->built_fmts = 0;
st->chan_in_num = 999;
st->chan_out_num = 999;
/* Mark the channel complement as not built */
- compl_ztc->chan_built = 0;
+ compl_ztc->flags.chan_built = 0;
compl_ztc->built_fmts = 0;
compl_st = compl_ztc->pvt;
compl_st->chan_in_num = 999;
@@ -1509,8 +1509,10 @@ static int __devinit init_one(struct pci_dev *pdev, const struct pci_device_id *
wc->udecode->channels[x].pvt = &decoders[x];
}
- zt_transcoder_register(wc->uencode, THIS_MODULE);
- zt_transcoder_register(wc->udecode, THIS_MODULE);
+ wc->uencode->owner = wc->udecode->owner = THIS_MODULE;
+
+ zt_transcoder_register(wc->uencode);
+ zt_transcoder_register(wc->udecode);
/* Enable bus mastering */
pci_set_master(pdev);