diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2009-09-18 16:43:19 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2009-09-18 16:43:19 +0000 |
| commit | 853e246fe13af38e29fbae92cd6fd0d8aac6ab4c (patch) | |
| tree | ab3f639586f84a4cd23cc616703cbf50f482b639 /sys/dev/sun | |
| parent | a29a5a76597997aca8afc35cda586c7ab69bbab0 (diff) | |
Split device_t/softc. Tested on SS1+.
XXX: sparc/dev/cgthree.c in Attic had an attachment for cgthree* at obio?
XXX: and sparc/conf/files.sparc still has an entry of nonexistent (or not yet)
XXX: sparc/dev/cgthree_obio.c. Is there any sun4m machine which requires it?
Diffstat (limited to 'sys/dev/sun')
| -rw-r--r-- | sys/dev/sun/cgthree.c | 11 | ||||
| -rw-r--r-- | sys/dev/sun/cgthreevar.h | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/sun/cgthree.c b/sys/dev/sun/cgthree.c index ceee9f42455..09c033d478c 100644 --- a/sys/dev/sun/cgthree.c +++ b/sys/dev/sun/cgthree.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgthree.c,v 1.23 2009/05/12 14:46:39 cegger Exp $ */ +/* $NetBSD: cgthree.c,v 1.24 2009/09/18 16:43:19 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.23 2009/05/12 14:46:39 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.24 2009/09/18 16:43:19 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -257,7 +257,7 @@ cgthreeattach(struct cgthree_softc *sc, const char *name, int isconsole) aa.console = isconsole; aa.accessops = &cgthree_accessops; aa.accesscookie = &sc->vd; - config_found(&sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); #else /* Initialize the default color map. */ bt_initcmap(&sc->sc_cmap, 256); @@ -336,10 +336,11 @@ cgthreeioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) * Undo the effect of an FBIOSVIDEO that turns the video off. */ static void -cgthreeunblank(device_t dev) +cgthreeunblank(device_t self) { + struct cgthree_softc *sc = device_private(self); - cgthree_set_video(device_private(dev), 1); + cgthree_set_video(sc, 1); } static void diff --git a/sys/dev/sun/cgthreevar.h b/sys/dev/sun/cgthreevar.h index dda1534aaf7..92ed6fa9987 100644 --- a/sys/dev/sun/cgthreevar.h +++ b/sys/dev/sun/cgthreevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cgthreevar.h,v 1.7 2009/02/23 22:44:27 jdc Exp $ */ +/* $NetBSD: cgthreevar.h,v 1.8 2009/09/18 16:43:19 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ /* per-display variables */ struct cgthree_softc { - struct device sc_dev; /* base device */ + device_t sc_dev; /* base device */ struct fbdevice sc_fb; /* frame buffer device */ bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; /* phys address for device mmap() */ |
