]> git.neil.brown.name Git - history.git/commitdiff
ISDN: Move drivers/isdn/i4l/isdn_fsm.h include/linux/isdn/fsm.h
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Tue, 29 Oct 2002 14:25:55 +0000 (08:25 -0600)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Tue, 29 Oct 2002 14:25:55 +0000 (08:25 -0600)
Though I've been mostly moving stuff out of include/linux and into
drivers/isdn/i4l, the finite state machine definitions actually need
to be more wildly accessible, so they go the opposite way.

drivers/isdn/i4l/isdn_fsm.c
drivers/isdn/i4l/isdn_fsm.h [deleted file]
drivers/isdn/i4l/isdn_net_lib.c
include/linux/isdn.h
include/linux/isdn/fsm.h [new file with mode: 0644]

index 5e453f1edd6222dedb2f2644cb2e93fa34085ee4..673b3ad9d632e44739e1b8b600b25f5153cb3bc2 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/string.h>
-#include "isdn_fsm.h"
+#include <linux/isdn/fsm.h>
 
 int
 fsm_new(struct fsm *fsm)
diff --git a/drivers/isdn/i4l/isdn_fsm.h b/drivers/isdn/i4l/isdn_fsm.h
deleted file mode 100644 (file)
index 95beb14..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Linux ISDN subsystem, finite state machine
- *
- * Author       Karsten Keil
- * Copyright              by Karsten Keil      <keil@isdn4linux.de>
- *              2001-2002 by Kai Germaschewski <kai@germaschewski.name>
- * 
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- */
-
-#ifndef __ISDN_FSM_H__
-#define __ISDN_FSM_H__
-
-#include <linux/kernel.h>
-#include <linux/timer.h>
-
-struct fsm_inst;
-
-typedef int (*fsm_fn)(struct fsm_inst *, int, void *);
-
-struct fsm {
-       fsm_fn *jumpmatrix;
-       int st_cnt, ev_cnt, fn_cnt;
-       char **st_str, **ev_str;
-       struct fsm_node *fn_tbl;
-};
-
-struct fsm_inst {
-       struct fsm *fsm;
-       int state;
-       int debug;
-       void *userdata;
-       int userint;
-       void (*printdebug) (struct fsm_inst *, char *, ...);
-};
-
-struct fsm_node {
-       int st, ev;
-       fsm_fn fn;
-};
-
-struct fsm_timer {
-       struct fsm_inst *fi;
-       struct timer_list tl;
-       int ev;
-       void *arg;
-};
-
-int  fsm_new(struct fsm *fsm);
-void fsm_free(struct fsm *fsm);
-int  fsm_event(struct fsm_inst *fi, int event, void *arg);
-void fsm_change_state(struct fsm_inst *fi, int newstate);
-void fsm_init_timer(struct fsm_inst *fi, struct fsm_timer *ft);
-int  fsm_add_timer(struct fsm_timer *ft, int timeout, int event);
-void fsm_mod_timer(struct fsm_timer *ft, int timeout, int event);
-void fsm_del_timer(struct fsm_timer *ft);
-
-#endif
index 2fcafe906181a46f4b3d2b6663649ea64bb883cb..8bc24804a21ddfcca4bf2f8f16b0a3a7422f1ed6 100644 (file)
@@ -56,7 +56,6 @@
 #include "isdn_common.h"
 #include "isdn_net.h"
 #include "isdn_ppp.h"
-#include "isdn_fsm.h"
 
 #define ISDN_NET_TX_TIMEOUT (20*HZ) 
 
index 42baf99a835ad0756fda33ac460f103b12b28503..5055fbe6b687527c490481998eb1a8ed03f983d7 100644 (file)
@@ -14,9 +14,7 @@
 #define __ISDN_H__
 
 #include <linux/ioctl.h>
-
-// FIXME!!!
-#include <../drivers/isdn/i4l/isdn_fsm.h>
+#include <linux/isdn/fsm.h>
 
 #ifdef CONFIG_COBALT_MICRO_SERVER
 /* Save memory */
diff --git a/include/linux/isdn/fsm.h b/include/linux/isdn/fsm.h
new file mode 100644 (file)
index 0000000..95beb14
--- /dev/null
@@ -0,0 +1,58 @@
+/* Linux ISDN subsystem, finite state machine
+ *
+ * Author       Karsten Keil
+ * Copyright              by Karsten Keil      <keil@isdn4linux.de>
+ *              2001-2002 by Kai Germaschewski <kai@germaschewski.name>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#ifndef __ISDN_FSM_H__
+#define __ISDN_FSM_H__
+
+#include <linux/kernel.h>
+#include <linux/timer.h>
+
+struct fsm_inst;
+
+typedef int (*fsm_fn)(struct fsm_inst *, int, void *);
+
+struct fsm {
+       fsm_fn *jumpmatrix;
+       int st_cnt, ev_cnt, fn_cnt;
+       char **st_str, **ev_str;
+       struct fsm_node *fn_tbl;
+};
+
+struct fsm_inst {
+       struct fsm *fsm;
+       int state;
+       int debug;
+       void *userdata;
+       int userint;
+       void (*printdebug) (struct fsm_inst *, char *, ...);
+};
+
+struct fsm_node {
+       int st, ev;
+       fsm_fn fn;
+};
+
+struct fsm_timer {
+       struct fsm_inst *fi;
+       struct timer_list tl;
+       int ev;
+       void *arg;
+};
+
+int  fsm_new(struct fsm *fsm);
+void fsm_free(struct fsm *fsm);
+int  fsm_event(struct fsm_inst *fi, int event, void *arg);
+void fsm_change_state(struct fsm_inst *fi, int newstate);
+void fsm_init_timer(struct fsm_inst *fi, struct fsm_timer *ft);
+int  fsm_add_timer(struct fsm_timer *ft, int timeout, int event);
+void fsm_mod_timer(struct fsm_timer *ft, int timeout, int event);
+void fsm_del_timer(struct fsm_timer *ft);
+
+#endif