[svn-commits] sruffell: linux/trunk r5029 - /linux/trunk/drivers/dahdi/wctc4xxp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 2 16:01:07 CDT 2008


Author: sruffell
Date: Thu Oct  2 16:01:07 2008
New Revision: 5029

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5029
Log:
wctc4xxp_cleanup_channel_private needs a pointer to the zt_transcoder_channel
and not just the private portion now in order to manage the data ready flag
state.


Modified:
    linux/trunk/drivers/dahdi/wctc4xxp/base.c

Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=5029&r1=5028&r2=5029
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Thu Oct  2 16:01:07 2008
@@ -1432,9 +1432,11 @@
 }
 
 static void 
-wctc4xxp_cleanup_channel_private(struct wcdte *wc, struct channel_pvt *cpvt)
+wctc4xxp_cleanup_channel_private(struct wcdte *wc, struct
+	dahdi_transcoder_channel *dtc)
 {
 	struct tcb *cmd, *temp;
+	struct channel_pvt *cpvt = dtc->pvt;
 	LIST_HEAD(local_list);
 
 	spin_lock_bh(&cpvt->lock);
@@ -1474,7 +1476,7 @@
 	compl_cpvt->chan_in_num = cpvt->chan_out_num;
 	compl_cpvt->chan_out_num = cpvt->chan_in_num;
 	dahdi_tc_set_built(compl_dtc);
-	wctc4xxp_cleanup_channel_private(wc, compl_cpvt);
+	wctc4xxp_cleanup_channel_private(wc, dtc);
 
 	return 0;
 }
@@ -1492,7 +1494,7 @@
 	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP, 
 	          "Entering %s for channel %p.\n", __FUNCTION__, dtc);
 	/* Anything on the rx queue now is old news... */
-	wctc4xxp_cleanup_channel_private(wc, cpvt);
+	wctc4xxp_cleanup_channel_private(wc, dtc);
 	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP, "Allocating a new channel: %p.\n", dtc);
 	wctc4xxp_srcfmt = wctc4xxp_dahdifmt_to_dtefmt(dtc->srcfmt);
 	wctc4xxp_dstfmt = wctc4xxp_dahdifmt_to_dtefmt(dtc->dstfmt);
@@ -1558,7 +1560,7 @@
 		return -EINTR;
 	}
 	/* Remove any packets that are waiting on the outbound queue. */
-	wctc4xxp_cleanup_channel_private(wc, cpvt);
+	wctc4xxp_cleanup_channel_private(wc, dtc);
 	index = cpvt->timeslot_in_num/2;
 	BUG_ON(index >= wc->numchannels);
 	if (ENCODER == cpvt->encoder) {
@@ -3132,16 +3134,13 @@
 {
 	int i;
 	struct dahdi_transcoder_channel *dtc_en, *dtc_de;
-	struct channel_pvt *cpvt;
 
 	for(i = 0; i < wc->numchannels; i++) {
 		dtc_en = &(wc->uencode->channels[i]);
-		cpvt = dtc_en->pvt;
-		wctc4xxp_cleanup_channel_private(wc, cpvt);
+		wctc4xxp_cleanup_channel_private(wc, dtc_en);
 		
 		dtc_de = &(wc->udecode->channels[i]);
-		cpvt = dtc_de->pvt;
-		wctc4xxp_cleanup_channel_private(wc, cpvt);
+		wctc4xxp_cleanup_channel_private(wc, dtc_de);
 	}
 }
 




More information about the svn-commits mailing list