From b2af10d896f48ec605ada4af4df70f53bca6badb Mon Sep 17 00:00:00 2001 From: kpfleming Date: Thu, 1 Feb 2007 20:17:23 +0000 Subject: 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 --- wctc4xxp/base.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'wctc4xxp') 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); -- cgit v1.2.3