summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-01-15 21:08:38 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-01-15 21:08:38 +0000
commit5fd728aacbead7a5e2e8a439b82d5868ed771149 (patch)
treef6bfbd5a4a0d591d9fdcb08f238d64d134635892 /sys
parent4cd9cc821b37c055d59aedba60da2bd16a3a3237 (diff)
Use DIO_SIZE() macro instead of rolling our own implementation of it.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hp300/dev/dca.c9
-rw-r--r--sys/arch/hp300/dev/dcm.c9
-rw-r--r--sys/arch/hp300/dev/dvbox.c9
-rw-r--r--sys/arch/hp300/dev/gbox.c9
-rw-r--r--sys/arch/hp300/dev/hyper.c9
-rw-r--r--sys/arch/hp300/dev/rbox.c9
-rw-r--r--sys/arch/hp300/dev/topcat.c9
7 files changed, 14 insertions, 49 deletions
diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c
index 5dedb908cb0..c71a866233b 100644
--- a/sys/arch/hp300/dev/dca.c
+++ b/sys/arch/hp300/dev/dca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dca.c,v 1.22 2005/01/14 22:39:25 miod Exp $ */
+/* $OpenBSD: dca.c,v 1.23 2005/01/15 21:08:36 miod Exp $ */
/* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */
/*
@@ -979,7 +979,6 @@ dca_console_scan(scode, va, arg)
{
struct dcadevice *dca = (struct dcadevice *)va;
struct consdev *cp = arg;
- u_char *dioiidev;
int force = 0, pri;
switch (dca->dca_id) {
@@ -1017,11 +1016,7 @@ dca_console_scan(scode, va, arg)
*/
if (((cn_tab == NULL) || (cp->cn_pri > cn_tab->cn_pri)) || force) {
cn_tab = cp;
- if (scode >= 132) {
- dioiidev = (u_char *)va;
- return ((dioiidev[0x101] + 1) * 0x100000);
- }
- return (DIO_DEVSIZE);
+ return (DIO_SIZE(scode, va));
}
return (0);
}
diff --git a/sys/arch/hp300/dev/dcm.c b/sys/arch/hp300/dev/dcm.c
index a2060d15a10..c69f664ab9f 100644
--- a/sys/arch/hp300/dev/dcm.c
+++ b/sys/arch/hp300/dev/dcm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dcm.c,v 1.21 2005/01/14 22:39:25 miod Exp $ */
+/* $OpenBSD: dcm.c,v 1.22 2005/01/15 21:08:36 miod Exp $ */
/* $NetBSD: dcm.c,v 1.41 1997/05/05 20:59:16 thorpej Exp $ */
/*
@@ -1507,7 +1507,6 @@ dcm_console_scan(scode, va, arg)
{
struct dcmdevice *dcm = (struct dcmdevice *)va;
struct consdev *cp = arg;
- u_char *dioiidev;
int force = 0, pri;
switch (dcm->dcm_rsid) {
@@ -1543,11 +1542,7 @@ dcm_console_scan(scode, va, arg)
*/
if (((cn_tab == NULL) || (cp->cn_pri > cn_tab->cn_pri)) || force) {
cn_tab = cp;
- if (scode >= 132) {
- dioiidev = (u_char *)va;
- return ((dioiidev[0x101] + 1) * 0x100000);
- }
- return (DIO_DEVSIZE);
+ return (DIO_SIZE(scode, va));
}
return (0);
}
diff --git a/sys/arch/hp300/dev/dvbox.c b/sys/arch/hp300/dev/dvbox.c
index 01c08b3afce..6be9dbce31c 100644
--- a/sys/arch/hp300/dev/dvbox.c
+++ b/sys/arch/hp300/dev/dvbox.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dvbox.c,v 1.1 2005/01/14 22:39:25 miod Exp $ */
+/* $OpenBSD: dvbox.c,v 1.2 2005/01/15 21:08:36 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -413,7 +413,6 @@ dvbox_console_scan(int scode, caddr_t va, void *arg)
{
struct diofbreg *fbr = (struct diofbreg *)va;
struct consdev *cp = arg;
- u_char *dioiidev;
int force = 0, pri;
if (fbr->id != GRFHWID || fbr->id2 != GID_DAVINCI)
@@ -441,11 +440,7 @@ dvbox_console_scan(int scode, caddr_t va, void *arg)
*/
if (((cn_tab == NULL) || (cp->cn_pri > cn_tab->cn_pri)) || force) {
cn_tab = cp;
- if (scode >= DIOII_SCBASE) {
- dioiidev = (u_char *)va;
- return ((dioiidev[0x101] + 1) * 0x100000);
- }
- return (DIO_DEVSIZE);
+ return (DIO_SIZE(scode, va));
}
return (0);
}
diff --git a/sys/arch/hp300/dev/gbox.c b/sys/arch/hp300/dev/gbox.c
index 823954c82e1..c571687e422 100644
--- a/sys/arch/hp300/dev/gbox.c
+++ b/sys/arch/hp300/dev/gbox.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gbox.c,v 1.1 2005/01/14 22:39:25 miod Exp $ */
+/* $OpenBSD: gbox.c,v 1.2 2005/01/15 21:08:36 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -403,7 +403,6 @@ gbox_console_scan(int scode, caddr_t va, void *arg)
{
struct diofbreg *fbr = (struct diofbreg *)va;
struct consdev *cp = arg;
- u_char *dioiidev;
int force = 0, pri;
if (fbr->id != GRFHWID || fbr->id2 == GID_GATORBOX)
@@ -431,11 +430,7 @@ gbox_console_scan(int scode, caddr_t va, void *arg)
*/
if (((cn_tab == NULL) || (cp->cn_pri > cn_tab->cn_pri)) || force) {
cn_tab = cp;
- if (scode >= DIOII_SCBASE) {
- dioiidev = (u_char *)va;
- return ((dioiidev[0x101] + 1) * 0x100000);
- }
- return (DIO_DEVSIZE);
+ return (DIO_SIZE(scode, va));
}
return (0);
}
diff --git a/sys/arch/hp300/dev/hyper.c b/sys/arch/hp300/dev/hyper.c
index 36c1b6b9b0d..05fdade8c17 100644
--- a/sys/arch/hp300/dev/hyper.c
+++ b/sys/arch/hp300/dev/hyper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hyper.c,v 1.1 2005/01/14 22:39:25 miod Exp $ */
+/* $OpenBSD: hyper.c,v 1.2 2005/01/15 21:08:37 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -530,7 +530,6 @@ hyper_console_scan(int scode, caddr_t va, void *arg)
{
struct diofbreg *fbr = (struct diofbreg *)va;
struct consdev *cp = arg;
- u_char *dioiidev;
int force = 0, pri;
if (fbr->id != GRFHWID || fbr->id2 != GID_HYPERION)
@@ -558,11 +557,7 @@ hyper_console_scan(int scode, caddr_t va, void *arg)
*/
if (((cn_tab == NULL) || (cp->cn_pri > cn_tab->cn_pri)) || force) {
cn_tab = cp;
- if (scode >= DIOII_SCBASE) {
- dioiidev = (u_char *)va;
- return ((dioiidev[0x101] + 1) * 0x100000);
- }
- return (DIO_DEVSIZE);
+ return (DIO_SIZE(scode, va));
}
return (0);
}
diff --git a/sys/arch/hp300/dev/rbox.c b/sys/arch/hp300/dev/rbox.c
index effe4108aa5..8646d8f179f 100644
--- a/sys/arch/hp300/dev/rbox.c
+++ b/sys/arch/hp300/dev/rbox.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbox.c,v 1.1 2005/01/14 22:39:26 miod Exp $ */
+/* $OpenBSD: rbox.c,v 1.2 2005/01/15 21:08:37 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -375,7 +375,6 @@ rbox_console_scan(int scode, caddr_t va, void *arg)
{
struct diofbreg *fbr = (struct diofbreg *)va;
struct consdev *cp = arg;
- u_char *dioiidev;
int force = 0, pri;
if (fbr->id != GRFHWID || fbr->id2 != GID_RENAISSANCE)
@@ -403,11 +402,7 @@ rbox_console_scan(int scode, caddr_t va, void *arg)
*/
if (((cn_tab == NULL) || (cp->cn_pri > cn_tab->cn_pri)) || force) {
cn_tab = cp;
- if (scode >= DIOII_SCBASE) {
- dioiidev = (u_char *)va;
- return ((dioiidev[0x101] + 1) * 0x100000);
- }
- return (DIO_DEVSIZE);
+ return (DIO_SIZE(scode, va));
}
return (0);
}
diff --git a/sys/arch/hp300/dev/topcat.c b/sys/arch/hp300/dev/topcat.c
index d9a5c3dc922..c478c09228e 100644
--- a/sys/arch/hp300/dev/topcat.c
+++ b/sys/arch/hp300/dev/topcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: topcat.c,v 1.1 2005/01/14 22:39:26 miod Exp $ */
+/* $OpenBSD: topcat.c,v 1.2 2005/01/15 21:08:37 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -456,7 +456,6 @@ topcat_console_scan(int scode, caddr_t va, void *arg)
{
struct diofbreg *fbr = (struct diofbreg *)va;
struct consdev *cp = arg;
- u_char *dioiidev;
int force = 0, pri;
if (fbr->id != GRFHWID)
@@ -495,11 +494,7 @@ topcat_console_scan(int scode, caddr_t va, void *arg)
*/
if (((cn_tab == NULL) || (cp->cn_pri > cn_tab->cn_pri)) || force) {
cn_tab = cp;
- if (scode >= DIOII_SCBASE) {
- dioiidev = (u_char *)va;
- return ((dioiidev[0x101] + 1) * 0x100000);
- }
- return (DIO_DEVSIZE);
+ return (DIO_SIZE(scode, va));
}
return (0);
}