summaryrefslogtreecommitdiff
path: root/drivers/isdn/hisax/fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hisax/fsm.c')
-rw-r--r--drivers/isdn/hisax/fsm.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c
index 732ea633758c..1bb291021fdb 100644
--- a/drivers/isdn/hisax/fsm.c
+++ b/drivers/isdn/hisax/fsm.c
@@ -5,7 +5,7 @@
* Author Karsten Keil
* Copyright by Karsten Keil <keil@isdn4linux.de>
* by Kai Germaschewski <kai.germaschewski@gmx.de>
- *
+ *
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
@@ -27,18 +27,18 @@ FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount)
int i;
fsm->jumpmatrix = (FSMFNPTR *)
- kzalloc(sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL);
+ kzalloc(sizeof(FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL);
if (!fsm->jumpmatrix)
return -ENOMEM;
- for (i = 0; i < fncount; i++)
- if ((fnlist[i].state>=fsm->state_count) || (fnlist[i].event>=fsm->event_count)) {
+ for (i = 0; i < fncount; i++)
+ if ((fnlist[i].state >= fsm->state_count) || (fnlist[i].event >= fsm->event_count)) {
printk(KERN_ERR "FsmNew Error line %d st(%ld/%ld) ev(%ld/%ld)\n",
- i,(long)fnlist[i].state,(long)fsm->state_count,
- (long)fnlist[i].event,(long)fsm->event_count);
- } else
+ i, (long)fnlist[i].state, (long)fsm->state_count,
+ (long)fnlist[i].event, (long)fsm->event_count);
+ } else
fsm->jumpmatrix[fsm->state_count * fnlist[i].event +
- fnlist[i].state] = (FSMFNPTR) fnlist[i].routine;
+ fnlist[i].state] = (FSMFNPTR)fnlist[i].routine;
return 0;
}
@@ -53,24 +53,24 @@ FsmEvent(struct FsmInst *fi, int event, void *arg)
{
FSMFNPTR r;
- if ((fi->state>=fi->fsm->state_count) || (event >= fi->fsm->event_count)) {
+ if ((fi->state >= fi->fsm->state_count) || (event >= fi->fsm->event_count)) {
printk(KERN_ERR "FsmEvent Error st(%ld/%ld) ev(%d/%ld)\n",
- (long)fi->state,(long)fi->fsm->state_count,event,(long)fi->fsm->event_count);
- return(1);
+ (long)fi->state, (long)fi->fsm->state_count, event, (long)fi->fsm->event_count);
+ return (1);
}
r = fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state];
if (r) {
if (fi->debug)
fi->printdebug(fi, "State %s Event %s",
- fi->fsm->strState[fi->state],
- fi->fsm->strEvent[event]);
+ fi->fsm->strState[fi->state],
+ fi->fsm->strEvent[event]);
r(fi, event, arg);
return (0);
} else {
if (fi->debug)
fi->printdebug(fi, "State %s Event %s no routine",
- fi->fsm->strState[fi->state],
- fi->fsm->strEvent[event]);
+ fi->fsm->strState[fi->state],
+ fi->fsm->strEvent[event]);
return (!0);
}
}
@@ -81,7 +81,7 @@ FsmChangeState(struct FsmInst *fi, int newstate)
fi->state = newstate;
if (fi->debug)
fi->printdebug(fi, "ChangeState %s",
- fi->fsm->strState[newstate]);
+ fi->fsm->strState[newstate]);
}
static void
@@ -125,7 +125,7 @@ FsmAddTimer(struct FsmTimer *ft,
#if FSM_TIMER_DEBUG
if (ft->fi->debug)
ft->fi->printdebug(ft->fi, "FsmAddTimer %lx %d %d",
- (long) ft, millisec, where);
+ (long) ft, millisec, where);
#endif
if (timer_pending(&ft->tl)) {
@@ -143,13 +143,13 @@ FsmAddTimer(struct FsmTimer *ft,
void
FsmRestartTimer(struct FsmTimer *ft,
- int millisec, int event, void *arg, int where)
+ int millisec, int event, void *arg, int where)
{
#if FSM_TIMER_DEBUG
if (ft->fi->debug)
ft->fi->printdebug(ft->fi, "FsmRestartTimer %lx %d %d",
- (long) ft, millisec, where);
+ (long) ft, millisec, where);
#endif
if (timer_pending(&ft->tl))