summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/tc/sfb.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-24 19:58:34 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-24 19:58:34 +0000
commit0ef244d8476654749f2eaf9441dc06b2fd4d4f7b (patch)
tree270851bce850e6dddd96484e78fa648cb8bec296 /sys/arch/alpha/tc/sfb.c
parenta77b8c21d70779c5365903c1f86d3c3126549212 (diff)
Sync with NetBSD 961207
Diffstat (limited to 'sys/arch/alpha/tc/sfb.c')
-rw-r--r--sys/arch/alpha/tc/sfb.c43
1 files changed, 28 insertions, 15 deletions
diff --git a/sys/arch/alpha/tc/sfb.c b/sys/arch/alpha/tc/sfb.c
index 0dd93e9a981..0bbff844adf 100644
--- a/sys/arch/alpha/tc/sfb.c
+++ b/sys/arch/alpha/tc/sfb.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: sfb.c,v 1.6 1996/12/08 00:20:56 niklas Exp $ */
-/* $NetBSD: sfb.c,v 1.5 1996/10/13 03:00:35 christos Exp $ */
+/* $OpenBSD: sfb.c,v 1.7 1997/01/24 19:58:17 niklas Exp $ */
+/* $NetBSD: sfb.c,v 1.7 1996/12/05 01:39:44 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -55,7 +55,11 @@
#include <machine/autoconf.h>
#include <machine/pte.h>
+#ifdef __BROKEN_INDIRECT_CONFIG
int sfbmatch __P((struct device *, void *, void *));
+#else
+int sfbmatch __P((struct device *, struct cfdata *, void *));
+#endif
void sfbattach __P((struct device *, struct device *, void *));
int sfbprint __P((void *, const char *));
@@ -79,8 +83,8 @@ struct wscons_emulfuncs sfb_emulfuncs = {
rcons_eraserows,
};
-int sfbioctl __P((struct device *, u_long, caddr_t, int, struct proc *));
-int sfbmmap __P((struct device *, off_t, int));
+int sfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
+int sfbmmap __P((void *, off_t, int));
#if 0
void sfb_blank __P((struct sfb_devconfig *));
@@ -90,7 +94,12 @@ void sfb_unblank __P((struct sfb_devconfig *));
int
sfbmatch(parent, match, aux)
struct device *parent;
- void *match, *aux;
+#ifdef __BROKEN_INDIRECT_CONFIG
+ void *match;
+#else
+ struct cfdata *match;
+#endif
+ void *aux;
{
struct tc_attach_args *ta = aux;
@@ -236,14 +245,18 @@ sfbattach(parent, self, aux)
waa.waa_isconsole = console;
wo = &waa.waa_odev_spec;
- wo->wo_ef = &sfb_emulfuncs;
- wo->wo_efa = &sc->sc_dc->dc_rcons;
+
+ wo->wo_emulfuncs = &sfb_emulfuncs;
+ wo->wo_emulfuncs_cookie = &sc->sc_dc->dc_rcons;
+
+ wo->wo_ioctl = sfbioctl;
+ wo->wo_mmap = sfbmmap;
+ wo->wo_miscfuncs_cookie = sc;
+
wo->wo_nrows = sc->sc_dc->dc_rcons.rc_maxrow;
wo->wo_ncols = sc->sc_dc->dc_rcons.rc_maxcol;
wo->wo_crow = 0;
wo->wo_ccol = 0;
- wo->wo_ioctl = sfbioctl;
- wo->wo_mmap = sfbmmap;
config_found(self, &waa, sfbprint);
}
@@ -260,14 +273,14 @@ sfbprint(aux, pnp)
}
int
-sfbioctl(dev, cmd, data, flag, p)
- struct device *dev;
+sfbioctl(v, cmd, data, flag, p)
+ void *v;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
{
- struct sfb_softc *sc = (struct sfb_softc *)dev;
+ struct sfb_softc *sc = v;
struct sfb_devconfig *dc = sc->sc_dc;
switch (cmd) {
@@ -327,12 +340,12 @@ sfbioctl(dev, cmd, data, flag, p)
}
int
-sfbmmap(dev, offset, prot)
- struct device *dev;
+sfbmmap(v, offset, prot)
+ void *v;
off_t offset;
int prot;
{
- struct sfb_softc *sc = (struct sfb_softc *)dev;
+ struct sfb_softc *sc = v;
if (offset > SFB_SIZE)
return -1;