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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Sep 14 09:02:41 CDT 2010


Author: sruffell
Date: Tue Sep 14 09:02:33 2010
New Revision: 9324

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9324
Log:
dahdi: 0 -> DAHDI_LAW_DEFAULT

Makes it a little more clear what the '0' parameter represents.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

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

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9324&r1=9323&r2=9324
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Sep 14 09:02:33 2010
@@ -1334,7 +1334,7 @@
 	chan->eventinidx = chan->eventoutidx = 0;
 	chan->flags &= ~(DAHDI_FLAG_LOOPED | DAHDI_FLAG_LINEAR | DAHDI_FLAG_PPP | DAHDI_FLAG_SIGFREEZE);
 
-	dahdi_set_law(chan,0);
+	dahdi_set_law(chan, DAHDI_LAW_DEFAULT);
 
 	memset(chan->conflast, 0, sizeof(chan->conflast));
 	memset(chan->conflast1, 0, sizeof(chan->conflast1));
@@ -1549,7 +1549,7 @@
 
 static void dahdi_set_law(struct dahdi_chan *chan, int law)
 {
-	if (!law) {
+	if (DAHDI_LAW_DEFAULT == law) {
 		if (chan->deflaw)
 			law = chan->deflaw;
 		else
@@ -1587,7 +1587,7 @@
 		chan->readchunk = chan->sreadchunk;
 	if (!chan->writechunk)
 		chan->writechunk = chan->swritechunk;
-	dahdi_set_law(chan, 0);
+	dahdi_set_law(chan, DAHDI_LAW_DEFAULT);
 	close_channel(chan);
 
 	write_lock_irqsave(&chan_lock, flags);
@@ -2632,7 +2632,7 @@
 	chan->txgain = defgain;
 	chan->gainalloc = 0;
 	chan->eventinidx = chan->eventoutidx = 0;
-	dahdi_set_law(chan,0);
+	dahdi_set_law(chan, DAHDI_LAW_DEFAULT);
 	dahdi_hangup(chan);
 
 	/* Make sure that the audio flag is cleared on a clear channel */




More information about the svn-commits mailing list