[svn-commits] sruffell: branch linux/sruffell/wctdm24xxp-cmdlist r9854 - /linux/team/sruffe...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 16 16:40:22 CDT 2011


Author: sruffell
Date: Wed Mar 16 16:40:18 2011
New Revision: 9854

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9854
Log:
wctdm24xxp: Trivial. Reduce the indentation level in wctdm_proslic_oppending.

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

Modified:
    linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c

Modified: linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9854&r1=9853&r2=9854
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c Wed Mar 16 16:40:18 2011
@@ -1285,39 +1285,40 @@
 	struct fxs *const fxs = &mod->mod.fxs;
 	int res;
 
+	if (!(fxs->lasttxhook & SLIC_LF_OPPENDING))
+		return;
+
 	/* Monitor the Pending LF state change, for the next 100ms */
-	if (fxs->lasttxhook & SLIC_LF_OPPENDING) {
-		spin_lock(&fxs->lasttxhooklock);
-
-		if (!(fxs->lasttxhook & SLIC_LF_OPPENDING)) {
-			spin_unlock(&fxs->lasttxhooklock);
-			return;
-		}
-
-		res = mod->cmdq.isrshadow[1];
-		if ((res & SLIC_LF_SETMASK) == (fxs->lasttxhook & SLIC_LF_SETMASK)) {
-			fxs->lasttxhook &= SLIC_LF_SETMASK;
-			fxs->oppending_ms = 0;
-			if (debug & DEBUG_CARD) {
-				dev_info(&wc->vb.pdev->dev,
-					 "SLIC_LF OK: card=%d shadow=%02x "
-					 "lasttxhook=%02x intcount=%d\n", card,
-					 res, fxs->lasttxhook, wc->intcount);
-			}
-		} else if (fxs->oppending_ms && (--fxs->oppending_ms == 0)) {
-			/* Timed out, resend the linestate */
-			mod->sethook = CMD_WR(LINE_STATE, fxs->lasttxhook);
-			if (debug & DEBUG_CARD) {
-				dev_info(&wc->vb.pdev->dev,
-					 "SLIC_LF RETRY: card=%d shadow=%02x "
-					 "lasttxhook=%02x intcount=%d\n", card,
-					 res, fxs->lasttxhook, wc->intcount);
-			}
-		} else { /* Start 100ms Timeout */
-			fxs->oppending_ms = 100;
-		}
+	spin_lock(&fxs->lasttxhooklock);
+
+	if (!(fxs->lasttxhook & SLIC_LF_OPPENDING)) {
 		spin_unlock(&fxs->lasttxhooklock);
-	}
+		return;
+	}
+
+	res = mod->cmdq.isrshadow[1];
+	if ((res & SLIC_LF_SETMASK) == (fxs->lasttxhook & SLIC_LF_SETMASK)) {
+		fxs->lasttxhook &= SLIC_LF_SETMASK;
+		fxs->oppending_ms = 0;
+		if (debug & DEBUG_CARD) {
+			dev_info(&wc->vb.pdev->dev,
+				 "SLIC_LF OK: card=%d shadow=%02x "
+				 "lasttxhook=%02x intcount=%d\n", card,
+				 res, fxs->lasttxhook, wc->intcount);
+		}
+	} else if (fxs->oppending_ms && (--fxs->oppending_ms == 0)) {
+		/* Timed out, resend the linestate */
+		mod->sethook = CMD_WR(LINE_STATE, fxs->lasttxhook);
+		if (debug & DEBUG_CARD) {
+			dev_info(&wc->vb.pdev->dev,
+				 "SLIC_LF RETRY: card=%d shadow=%02x "
+				 "lasttxhook=%02x intcount=%d\n", card,
+				 res, fxs->lasttxhook, wc->intcount);
+		}
+	} else { /* Start 100ms Timeout */
+		fxs->oppending_ms = 100;
+	}
+	spin_unlock(&fxs->lasttxhooklock);
 }
 
 /* 256ms interrupt */




More information about the svn-commits mailing list