diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-01-15 07:09:34 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-01-15 07:09:34 +0000 |
commit | 78e1d85570fc529b25ed6827fcf1a53bb2f8f389 (patch) | |
tree | 376e807c9580355a7016451e141b47b3d08e748a /sys/dev | |
parent | 78aeb07694e2ef85c4c76e4f6d400d2412532b9e (diff) |
added prototypes, made some functions static, removed unused variables
now compiles with -Werror -Wall -Wstrict-prototypes
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sun/kbd.c | 30 | ||||
-rw-r--r-- | sys/dev/sun/kbd_xlate.h | 9 | ||||
-rw-r--r-- | sys/dev/sun/ms.c | 16 |
3 files changed, 39 insertions, 16 deletions
diff --git a/sys/dev/sun/kbd.c b/sys/dev/sun/kbd.c index 3ec2444da09..e730df0e5d5 100644 --- a/sys/dev/sun/kbd.c +++ b/sys/dev/sun/kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd.c,v 1.5 1996/12/03 07:36:32 kstailey Exp $ */ +/* $OpenBSD: kbd.c,v 1.6 1997/01/15 07:09:29 kstailey Exp $ */ /* $NetBSD: kbd.c,v 1.8 1996/05/17 19:32:06 gwr Exp $ */ /* @@ -65,6 +65,7 @@ #include <sys/conf.h> #include <sys/file.h> #include <sys/ioctl.h> +#include <sys/signalvar.h> #include <sys/time.h> #include <sys/kernel.h> #include <sys/syslog.h> @@ -188,8 +189,18 @@ struct zsops zsops_kbd; * Definition of the driver for autoconfig. ****************************************************************/ -static int kbd_match(struct device *, void *, void *); -static void kbd_attach(struct device *, struct device *, void *); +static int kbd_match __P((struct device *, void *, void *)); +static void kbd_attach __P((struct device *, struct device *, void *)); + +static int kbd_drain_tx __P((struct kbd_softc *)); +static void kbd_input_string __P((struct kbd_softc *, char *str)); +static void kbd_input_funckey __P((struct kbd_softc *,register int)); +static void kbd_input_keysym __P((struct kbd_softc *,register int)); +static void kbd_input_raw __P((struct kbd_softc *,register int)); +static void kbd_rxint __P((register struct zs_chanstate *)); +static void kbd_txint __P((register struct zs_chanstate *)); +static void kbd_stint __P((register struct zs_chanstate *)); +static void kbd_softint __P((register struct zs_chanstate *)); struct cfattach kbd_ca = { sizeof(struct kbd_softc), kbd_match, kbd_attach @@ -295,7 +306,7 @@ kbdopen(dev, flags, mode, p) struct proc *p; { struct kbd_softc *k; - int error, s, unit; + int error, unit; unit = minor(dev); if (unit >= kbd_cd.cd_ndevs) @@ -627,7 +638,6 @@ kbd_iocsled(k, data) struct kbd_softc *k; int *data; { - struct kbd_state *ks = &k->k_state; int leds, error, s; leds = *data; @@ -727,7 +737,7 @@ kbd_code_to_keysym(ks, c) return (keysym); } -void +static void kbd_input_string(k, str) struct kbd_softc *k; char *str; @@ -738,7 +748,7 @@ kbd_input_string(k, str) } } -void +static void kbd_input_funckey(k, keysym) struct kbd_softc *k; register int keysym; @@ -759,7 +769,7 @@ kbd_input_funckey(k, keysym) * This is called by kbd_input_raw() or by kb_repeat() * to deliver ASCII input. Called at spltty(). */ -void +static void kbd_input_keysym(k, keysym) struct kbd_softc *k; register int keysym; @@ -1065,7 +1075,6 @@ kbd_softint(cs) register int get, c, s; int intr_flags; register u_short ring_data; - register u_char rr0, rr1; k = cs->cs_private; @@ -1286,7 +1295,7 @@ kbd_new_layout(k) * Wait for output to finish. * Called at spltty(). Has user context. */ -int +static int kbd_drain_tx(k) struct kbd_softc *k; { @@ -1312,7 +1321,6 @@ kbd_output(k, c) struct kbd_softc *k; int c; /* the data */ { - struct zs_chanstate *cs = k->k_cs; int put; put = k->k_tbput; diff --git a/sys/dev/sun/kbd_xlate.h b/sys/dev/sun/kbd_xlate.h index 263c80a23b2..4a84b3542aa 100644 --- a/sys/dev/sun/kbd_xlate.h +++ b/sys/dev/sun/kbd_xlate.h @@ -1,3 +1,4 @@ +/* $OpenBSD: kbd_xlate.h,v 1.2 1997/01/15 07:09:31 kstailey Exp $ */ /* $NetBSD: kbd_xlate.h,v 1.1.1.1 1996/01/24 01:15:35 gwr Exp $ */ /* @@ -81,3 +82,11 @@ struct kbd_state { extern void kbd_xlate_init __P((struct kbd_state *ks)); extern int kbd_code_to_keysym __P((struct kbd_state *ks, int c)); +/* + * XXX: kd/kbd interface... Does this belong elsewhere? + * This is the only header shared between them... + */ + +extern int kbd_iopen __P((int unit)); +extern void kd_init __P((int unit)); +extern void kd_input __P((int c)); diff --git a/sys/dev/sun/ms.c b/sys/dev/sun/ms.c index 1ea4fb960c6..f8c18c78adc 100644 --- a/sys/dev/sun/ms.c +++ b/sys/dev/sun/ms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ms.c,v 1.5 1996/12/03 07:36:29 kstailey Exp $ */ +/* $OpenBSD: ms.c,v 1.6 1997/01/15 07:09:33 kstailey Exp $ */ /* $NetBSD: ms.c,v 1.6 1996/05/17 19:32:09 gwr Exp $ */ /* @@ -63,6 +63,7 @@ #include <sys/conf.h> #include <sys/ioctl.h> #include <sys/kernel.h> +#include <sys/signalvar.h> #include <sys/syslog.h> #include <dev/ic/z8530reg.h> @@ -140,8 +141,14 @@ struct zsops zsops_ms; * Definition of the driver for autoconfig. ****************************************************************/ -static int ms_match(struct device *, void *, void *); -static void ms_attach(struct device *, struct device *, void *); +static int ms_match __P((struct device *, void *, void *)); +static void ms_attach __P((struct device *, struct device *, void *)); + +static void ms_input __P((register struct ms_softc *, register int)); +static void ms_rxint __P((register struct zs_chanstate *)); +static void ms_txint __P((register struct zs_chanstate *)); +static void ms_stint __P((register struct zs_chanstate *)); +static void ms_softint __P((struct zs_chanstate *)); struct cfattach ms_ca = { sizeof(struct ms_softc), ms_match, ms_attach @@ -224,7 +231,7 @@ msopen(dev, flags, mode, p) struct proc *p; { struct ms_softc *ms; - int error, s, unit; + int unit; unit = minor(dev); if (unit >= ms_cd.cd_ndevs) @@ -564,7 +571,6 @@ ms_softint(cs) register int get, c, s; int intr_flags; register u_short ring_data; - register u_char rr0, rr1; ms = cs->cs_private; |