summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-02-15 12:02:01 -0600
committerShaun Ruffell <sruffell@digium.com>2011-04-15 14:18:59 -0500
commit436d7be97ebe982a6f667572102ce93693ec0acc (patch)
tree889d6bd00216a3ff505c21f3699d0bdbdfb348f0
parent15ca3016dcd1d858fde8631717d2234dabcf96ae (diff)
wctdm24xxp: Trivial. Reduce the indentation level in wctdm_proslic_oppending.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c57
1 files changed, 29 insertions, 28 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index fa92c9f..a828328 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -1285,39 +1285,40 @@ static inline void wctdm_proslic_check_oppending(struct wctdm *wc, int card)
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);
+ spin_lock(&fxs->lasttxhooklock);
- if (!(fxs->lasttxhook & SLIC_LF_OPPENDING)) {
- spin_unlock(&fxs->lasttxhooklock);
- return;
- }
+ 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;
+ 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);
}
- spin_unlock(&fxs->lasttxhooklock);
+ } 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 */