summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/isa/pms.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-30 22:41:57 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-30 22:41:57 +0000
commit072b56c97e17e8e69ddab5a735b5297387a88a70 (patch)
tree22eaee09956502609c240ddff8a108d8733521f9 /sys/arch/alpha/isa/pms.c
parentb85b15782739220b5bf2563ccdc7ac9e256a31d2 (diff)
Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.
Diffstat (limited to 'sys/arch/alpha/isa/pms.c')
-rw-r--r--sys/arch/alpha/isa/pms.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/arch/alpha/isa/pms.c b/sys/arch/alpha/isa/pms.c
index 3c13fe88153..7b758f43916 100644
--- a/sys/arch/alpha/isa/pms.c
+++ b/sys/arch/alpha/isa/pms.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: pms.c,v 1.2 1996/07/29 22:59:53 niklas Exp $ */
-/* $NetBSD: pms.c,v 1.1 1996/04/12 01:53:06 cgd Exp $ */
+/* $OpenBSD: pms.c,v 1.3 1996/10/30 22:39:42 niklas Exp $ */
+/* $NetBSD: pms.c,v 1.3 1996/10/13 02:59:58 christos Exp $ */
/*-
* Copyright (c) 1994 Charles Hannum.
@@ -53,6 +53,7 @@
#include <machine/intr.h>
#include <dev/isa/isavar.h>
#include <alpha/wscons/wsconsvar.h>
+#include <alpha/wscons/ms.h>
#define PMS_DATA 0x60 /* offset for data port, read-write */
#define PMS_CNTRL 0x64 /* offset for control port, write-only */
@@ -126,12 +127,17 @@ struct wscons_mdev_spec pms_mdev_spec = {
pms_disable,
};
-static inline void
+static __inline void pms_flush __P((void));
+static __inline void pms_dev_cmd __P((u_char));
+static __inline void pms_aux_cmd __P((u_char));
+static __inline void pms_pit_cmd __P((u_char));
+
+static __inline void
pms_flush()
{
u_char c;
- while (c = bus_io_read_1(pms_bc, pms_status_ioh, 0) & 0x03)
+ while ((c = bus_io_read_1(pms_bc, pms_status_ioh, 0)) & 0x03)
if ((c & PMS_OBUF_FULL) == PMS_OBUF_FULL) {
/* XXX - delay is needed to prevent some keyboards from
wedging when the system boots */
@@ -140,7 +146,7 @@ pms_flush()
}
}
-static inline void
+static __inline void
pms_dev_cmd(value)
u_char value;
{
@@ -151,7 +157,7 @@ pms_dev_cmd(value)
bus_io_write_1(pms_bc, pms_data_ioh, 0, value);
}
-static inline void
+static __inline void
pms_aux_cmd(value)
u_char value;
{
@@ -160,7 +166,7 @@ pms_aux_cmd(value)
bus_io_write_1(pms_bc, pms_cntrl_ioh, 0, value);
}
-static inline void
+static __inline void
pms_pit_cmd(value)
u_char value;
{
@@ -288,7 +294,6 @@ pmsintr(arg)
static u_char buttons;
u_char changed;
static char dx, dy;
- u_char buffer[5];
if ((sc->sc_state & PMS_OPEN) == 0) {
/* Interrupts are not expected. Discard the byte. */