patch-2.1.42 linux/drivers/isdn/hisax/fsm.c

Next file: linux/drivers/isdn/hisax/hisax.h
Previous file: linux/drivers/isdn/hisax/elsa.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.41/linux/drivers/isdn/hisax/fsm.c linux/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 @@
 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 @@
 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 @@
 void
 FsmChangeState(struct FsmInst *fi, int newstate)
 {
-	char            str[80];
+	char str[80];
 
 	fi->state = newstate;
 	if (fi->debug) {
@@ -90,7 +93,7 @@
 #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 @@
 #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 @@
 #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 @@
 #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

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov