Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/pmax/tc Not to use (cfdata->cf_unit > 0) conditiona...
details: https://anonhg.NetBSD.org/src/rev/499234011d92
branches: trunk
changeset: 481645:499234011d92
user: nisimura <nisimura%NetBSD.org@localhost>
date: Thu Feb 03 05:22:47 2000 +0000
description:
Not to use (cfdata->cf_unit > 0) conditional in device match() routine.
diffstat:
sys/arch/pmax/tc/ioasic.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (48 lines):
diff -r 6bd440f4a3ec -r 499234011d92 sys/arch/pmax/tc/ioasic.c
--- a/sys/arch/pmax/tc/ioasic.c Thu Feb 03 05:16:30 2000 +0000
+++ b/sys/arch/pmax/tc/ioasic.c Thu Feb 03 05:22:47 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ioasic.c,v 1.8 2000/01/14 13:45:28 simonb Exp $ */
+/* $NetBSD: ioasic.c,v 1.9 2000/02/03 05:22:47 nisimura Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.8 2000/01/14 13:45:28 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.9 2000/02/03 05:22:47 nisimura Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -103,7 +103,10 @@
sizeof(struct ioasic_softc), ioasicmatch, ioasicattach
};
-tc_addr_t ioasic_base = 0;
+tc_addr_t ioasic_base; /* XXX XXX XXX */
+
+/* There can be only one. */
+int ioasicfound;
static int
ioasicmatch(parent, cfdata, aux)
@@ -117,7 +120,7 @@
if (strncmp("IOCTL ", ta->ta_modname, TC_ROM_LLEN))
return (0);
- if (cfdata->cf_unit > 0)
+ if (ioasicfound)
return (0);
return (1);
@@ -134,6 +137,8 @@
int ioasic_ndevs, builtin_ndevs;
int i, imsk;
+ ioasicfound = 1;
+
sc->sc_bst = ta->ta_memt;
if (bus_space_map(ta->ta_memt, ta->ta_addr,
0x400000, 0, &sc->sc_bsh)) {
Home |
Main Index |
Thread Index |
Old Index