summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/fsm.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-03 09:23:20 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-03 09:23:20 +0000
commitac5ff8f4a72f7b4e66f73c3c6cb9fe7758cf6f12 (patch)
tree9fc7f8ce32e0d9a4aa055b2a58a05a5d727b333c /drivers/isdn/hisax/fsm.c
parent52662ff3e66770fd7e4fc508c91056d29c08bff0 (diff)
Sync with Linux 2.1.42.
Diffstat (limited to 'drivers/isdn/hisax/fsm.c')
-rw-r--r--drivers/isdn/hisax/fsm.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c
index 9ba0a2c18..d0bb2f14f 100644
--- a/drivers/isdn/hisax/fsm.c
+++ b/drivers/isdn/hisax/fsm.c
@@ -1,5 +1,5 @@
-/* $Id: fsm.c,v 1.3 1997/02/16 01:04:08 fritz Exp $
- *
+/* $Id: fsm.c,v 1.4 1997/04/06 22:56:42 keil Exp $
+
* Author Karsten Keil (keil@temic-ech.spacenet.de)
* based on the teles driver from Jan den Ouden
*
@@ -7,6 +7,9 @@
* Fritz Elfert
*
* $Log: fsm.c,v $
+ * Revision 1.4 1997/04/06 22:56:42 keil
+ * Some cosmetic changes
+ *
* Revision 1.3 1997/02/16 01:04:08 fritz
* Bugfix: Changed timer handling caused hang with 2.1.X
*
@@ -27,10 +30,10 @@ void
FsmNew(struct Fsm *fsm,
struct FsmNode *fnlist, int fncount)
{
- int i;
+ int i;
- fsm->jumpmatrix = (int *) Smalloc(4L * fsm->state_count * fsm->event_count,
- GFP_KERNEL, "Fsm jumpmatrix");
+ fsm->jumpmatrix = (int *)
+ kmalloc(4L * fsm->state_count * fsm->event_count, GFP_KERNEL);
memset(fsm->jumpmatrix, 0, 4L * fsm->state_count * fsm->event_count);
for (i = 0; i < fncount; i++)
@@ -41,14 +44,14 @@ FsmNew(struct Fsm *fsm,
void
FsmFree(struct Fsm *fsm)
{
- Sfree((void *) fsm->jumpmatrix);
+ kfree((void *) fsm->jumpmatrix);
}
int
FsmEvent(struct FsmInst *fi, int event, void *arg)
{
- void (*r) (struct FsmInst *, int, void *);
- char str[80];
+ void (*r) (struct FsmInst *, int, void *);
+ char str[80];
r = (void (*)) fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state];
if (r) {
@@ -74,7 +77,7 @@ FsmEvent(struct FsmInst *fi, int event, void *arg)
void
FsmChangeState(struct FsmInst *fi, int newstate)
{
- char str[80];
+ char str[80];
fi->state = newstate;
if (fi->debug) {
@@ -90,7 +93,7 @@ FsmExpireTimer(struct FsmTimer *ft)
#if FSM_TIMER_DEBUG
if (ft->fi->debug) {
char str[40];
- sprintf(str, "FsmExpireTimer %lx", (long)ft);
+ sprintf(str, "FsmExpireTimer %lx", (long) ft);
ft->fi->printdebug(ft->fi, str);
}
#endif
@@ -106,7 +109,7 @@ FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
#if FSM_TIMER_DEBUG
if (ft->fi->debug) {
char str[40];
- sprintf(str, "FsmInitTimer %lx", (long)ft);
+ sprintf(str, "FsmInitTimer %lx", (long) ft);
ft->fi->printdebug(ft->fi, str);
}
#endif
@@ -119,7 +122,7 @@ FsmDelTimer(struct FsmTimer *ft, int where)
#if FSM_TIMER_DEBUG
if (ft->fi->debug) {
char str[40];
- sprintf(str, "FsmDelTimer %lx %d", (long)ft, where);
+ sprintf(str, "FsmDelTimer %lx %d", (long) ft, where);
ft->fi->printdebug(ft->fi, str);
}
#endif
@@ -134,7 +137,7 @@ FsmAddTimer(struct FsmTimer *ft,
#if FSM_TIMER_DEBUG
if (ft->fi->debug) {
char str[40];
- sprintf(str, "FsmAddTimer %lx %d %d", (long)ft, millisec, where);
+ sprintf(str, "FsmAddTimer %lx %d %d", (long) ft, millisec, where);
ft->fi->printdebug(ft->fi, str);
}
#endif