summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-22 23:39:07 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-22 23:39:07 +0000
commit78848fa03518675817e036cb7c0c272321b4ffae (patch)
tree948d90ba58ab0bf238e05eadef48948862fa12e5
parent09e9e30bd1492b922ede493402447dc8844ebedf (diff)
make sure to run probe only once per device w/ grumpy testing
-rw-r--r--sys/arch/hppa/dev/sti_sgc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/hppa/dev/sti_sgc.c b/sys/arch/hppa/dev/sti_sgc.c
index 21101d93b4c..868a24164fd 100644
--- a/sys/arch/hppa/dev/sti_sgc.c
+++ b/sys/arch/hppa/dev/sti_sgc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti_sgc.c,v 1.20 2003/12/17 05:22:38 mickey Exp $ */
+/* $OpenBSD: sti_sgc.c,v 1.21 2003/12/22 23:39:06 mickey Exp $ */
/*
* Copyright (c) 2000-2003 Michael Shalayeff
@@ -66,6 +66,8 @@
#define STI_INEG_REV 0x60
#define STI_INEG_PROM 0xf0011000
+extern struct cfdriver sti_cd;
+
int sti_sgc_probe(struct device *, void *, void *);
void sti_sgc_attach(struct device *, struct device *, void *);
@@ -120,6 +122,10 @@ sti_sgc_probe(parent, match, aux)
u_char devtype;
int rv = 0, romunmapped = 0;
+ /* due to the graphic nature of this program do probe only one */
+ if (cf->cf_unit > sti_cd.cd_ndevs)
+ return (0);
+
if (ca->ca_type.iodc_type != HPPA_TYPE_FIO)
return (0);