diff options
author | Guillaume Knispel <gknispel@proformatique.com> | 2010-10-05 17:01:40 +0200 |
---|---|---|
committer | Guillaume Knispel <gknispel@proformatique.com> | 2010-10-05 17:01:40 +0200 |
commit | 4c7b70f063226d5b1c70c314db20bc71ba10abc2 (patch) | |
tree | eb9c877d8480727753f377303670a35124168955 /xivovp | |
parent | 9625f4d88d833be6c8c294d0f85452ce4c1c1c55 (diff) |
use proper Linux indentation
Diffstat (limited to 'xivovp')
-rw-r--r-- | xivovp/base.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/xivovp/base.c b/xivovp/base.c index b600f87..f767593 100644 --- a/xivovp/base.c +++ b/xivovp/base.c @@ -89,13 +89,13 @@ static struct xivovp_line* xivovp_line_from_ctx(VpLineCtxType* line_ctx) Vp890LineObjectType* line_obj; int i; - if(!line_ctx) + if (!line_ctx) panic(DRV_NAME ": LineCtx == NULL\n"); line_obj = line_ctx->pLineObj; - for(i = 0; i < ARRAY_SIZE(xivovp.line); i++) - if(&xivovp.line[i].line_obj == line_obj) + for (i = 0; i < ARRAY_SIZE(xivovp.line); i++) + if (&xivovp.line[i].line_obj == line_obj) return &xivovp.line[i]; panic(DRV_NAME ": unknown FX line, this shouldn't happen\n"); @@ -107,7 +107,7 @@ static void vp_set_debug_select_running(void) int i; uint32 debug_select; - for(i = 0; i < ARRAY_SIZE(xivovp.line); i++) { + for (i = 0; i < ARRAY_SIZE(xivovp.line); i++) { debug_select = DEBUG_SELECT_RUNNING; VpSetOption(&xivovp.line[i].vp_ctx, NULL, VP_OPTION_ID_DEBUG_SELECT, @@ -127,7 +127,7 @@ static int xivovp_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig) struct xivovp_line* line = chan->pvt; unsigned long flags; - if(line->txsig_queue_len >= ARRAY_SIZE(line->txsig_queue)) { + if (line->txsig_queue_len >= ARRAY_SIZE(line->txsig_queue)) { printk(KERN_WARNING DRV_NAME "(chan %d): txsig overrun", chan->chanpos); return -1; } @@ -146,8 +146,8 @@ static int xivovp_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig) static void xivovp_hooksig_pvt(struct xivovp_line* line, enum dahdi_txsig txsig) { int chanpos = line->chan.chanpos; - if(line->type == FXO_LINE) { - switch(txsig) { + if (line->type == FXO_LINE) { + switch (txsig) { case DAHDI_TXSIG_START: case DAHDI_TXSIG_OFFHOOK: printk(KERN_WARNING DRV_NAME "(chan %d): transmitting %s state on FXO, setting to TALK.\n", chanpos, txsig == DAHDI_TXSIG_START ? "START" : "OFFHOOK"); @@ -161,7 +161,7 @@ static void xivovp_hooksig_pvt(struct xivovp_line* line, enum dahdi_txsig txsig) printk(KERN_WARNING DRV_NAME "(chan %d): unsupported tx state for FXO: %d\n", chanpos, txsig); } } else /* FXS */ { - switch(txsig) { + switch (txsig) { case DAHDI_TXSIG_START: printk(KERN_WARNING DRV_NAME "(chan %d): transmitting START on FXS, setting to RINGING.\n", chanpos); VpSetLineState(&line->vp_ctx, VP_LINE_RINGING); @@ -191,18 +191,18 @@ static void xivovp_handle_txsig_queue(void) enum dahdi_txsig txsig_queue[TXQUEUE_LEN]; unsigned long flags; - for(i = 0; i < ARRAY_SIZE(xivovp.line); i++) { - if(xivovp.line[i].ready) { + for (i = 0; i < ARRAY_SIZE(xivovp.line); i++) { + if (xivovp.line[i].ready) { spin_lock_irqsave(&xivovp.line[i].lock, flags); - for(j = 0; j < xivovp.line[i].txsig_queue_len; j++) + for (j = 0; j < xivovp.line[i].txsig_queue_len; j++) txsig_queue[j] = xivovp.line[i].txsig_queue[j]; xivovp.line[i].txsig_queue_len = 0; spin_unlock_irqrestore(&xivovp.line[i].lock, flags); - for(k = 0; k < j; k++) + for (k = 0; k < j; k++) xivovp_hooksig_pvt(&xivovp.line[i], txsig_queue[k]); - } else if(!said) { + } else if (!said) { said = 1; printk(KERN_WARNING DRV_NAME ": txsig pending but calibration not done yet! Waiting...\n"); } @@ -405,10 +405,10 @@ span_init(void) init_waitqueue_head(&xivovp.span.maintq); /* still dunno what this is */ - for(l = xivovp.line; l < xivovp.line + NB_LINES; l++) { + for (l = xivovp.line; l < xivovp.line + NB_LINES; l++) { xivovp.chans[l - xivovp.line] = &l->chan; l->chan.pvt = l; - if(l->type == FXO_LINE) + if (l->type == FXO_LINE) /* /!\ FXO uses FXS sig and vice-versa */ l->chan.sigcap = DAHDI_SIG_FXSLS | DAHDI_SIG_FXSGS | DAHDI_SIG_FXSKS; @@ -418,7 +418,7 @@ span_init(void) spin_lock_init(&l->lock); } - if(dahdi_register(&xivovp.span, /*prefmaster*/ 0)) { + if (dahdi_register(&xivovp.span, /*prefmaster*/ 0)) { printk(KERN_WARNING DRV_NAME ": couldn't register span.\n"); return -EINVAL; } @@ -526,16 +526,16 @@ test_evb_ve890_init(void) } rc = xivovp_init(); - if(rc < 0) + if (rc < 0) goto err_xivovp_init; rc = vp_init(); - if(rc < 0) + if (rc < 0) goto err_vp_init; rc = span_init(); - if(rc < 0) { + if (rc < 0) { printk(KERN_ERR DRV_NAME ": ve890_dahdi_init failed\n"); goto err_dahdi_init; } |