diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-12-26 15:35:07 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-12-26 15:35:07 +0000 |
commit | 04a028b56126b89edbd4a15b95ad9253060adfb6 (patch) | |
tree | fe6e1c75991a112d411c9c4b4c5469a914e9e420 /sys/arch/sparc/dev | |
parent | 050fc57c31057b4b94bc88b91d8910bbfc074c11 (diff) |
Use nitems() and FBS_xxx symbolic constants in the video timing tables.
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r-- | sys/arch/sparc/dev/cgthree.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/arch/sparc/dev/cgthree.c b/sys/arch/sparc/dev/cgthree.c index 8b0d18417a5..9976f6a5100 100644 --- a/sys/arch/sparc/dev/cgthree.c +++ b/sys/arch/sparc/dev/cgthree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgthree.c,v 1.33 2007/02/18 18:40:35 miod Exp $ */ +/* $OpenBSD: cgthree.c,v 1.34 2008/12/26 15:35:06 miod Exp $ */ /* $NetBSD: cgthree.c,v 1.33 1997/05/24 20:16:11 pk Exp $ */ /* @@ -79,12 +79,6 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/buf.h> -#include <sys/device.h> -#include <sys/ioctl.h> -#include <sys/malloc.h> -#include <sys/mman.h> -#include <sys/tty.h> #include <sys/conf.h> #include <uvm/uvm_extern.h> @@ -151,12 +145,12 @@ struct cg3_videoctrl { u_int8_t vctrl[12]; } cg3_videoctrl[] = { { /* cpd-1790 */ - 0x31, + FBS_1152X900 | FBS_ID_COLOR, { 0xbb, 0x2b, 0x04, 0x14, 0xae, 0x03, 0xa8, 0x24, 0x01, 0x05, 0xff, 0x01 }, }, { /* gdm-20e20 */ - 0x41, + FBS_1280X1024 | FBS_ID_COLOR, { 0xb7, 0x27, 0x03, 0x0f, 0xae, 0x03, 0xae, 0x2a, 0x01, 0x09, 0xff, 0x01 }, }, @@ -216,8 +210,7 @@ cgthreeattach(struct device *parent, struct device *self, void *args) /* Transfer video magic to board, if it's not running */ if (isrdi == 0 && (sc->sc_fbc->fbc_ctrl & FBC_TIMING) == 0) - for (i = 0; i < sizeof(cg3_videoctrl)/sizeof(cg3_videoctrl[0]); - i++) { + for (i = 0; i < nitems(cg3_videoctrl); i++) { volatile struct fbcontrol *fbc = sc->sc_fbc; if (cg3_videoctrl[i].sense == 0xff || (fbc->fbc_status & FBS_MSENSE) == |