diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2006-06-01 17:06:17 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2006-06-01 17:06:17 +0000 |
commit | 85efc700f017a25bec544273e3a5bb688f048a65 (patch) | |
tree | 7eeb8189566c0b26a5c0194ca9a9cf0e2936efad /sys | |
parent | 24476b1db5e87a1e787de9c648c7a049a13b0272 (diff) |
Proper config attach, not always return 1 from probe.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/armish/dev/i80321_mainbus.c | 15 | ||||
-rw-r--r-- | sys/arch/armish/dev/obio.c | 15 |
2 files changed, 10 insertions, 20 deletions
diff --git a/sys/arch/armish/dev/i80321_mainbus.c b/sys/arch/armish/dev/i80321_mainbus.c index cdcefd57de9..6648f7f5be6 100644 --- a/sys/arch/armish/dev/i80321_mainbus.c +++ b/sys/arch/armish/dev/i80321_mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i80321_mainbus.c,v 1.4 2006/06/01 03:45:15 drahn Exp $ */ +/* $OpenBSD: i80321_mainbus.c,v 1.5 2006/06/01 17:06:16 drahn Exp $ */ /* $NetBSD: i80321_mainbus.c,v 1.16 2005/12/15 01:44:00 briggs Exp $ */ /* @@ -49,6 +49,7 @@ #include <machine/bus.h> +#include <arm/mainbus/mainbus.h> #include <armish/dev/iq80321reg.h> #include <armish/dev/iq80321var.h> @@ -88,24 +89,18 @@ struct cfdriver iopxs_cd = { int i80321_mainbus_found; int -i80321_mainbus_match(struct device *parent, void *cf, void *aux) +i80321_mainbus_match(struct device *parent, void *match, void *aux) { -#if 0 struct mainbus_attach_args *ma = aux; -#endif + struct cfdata *cf = match; if (i80321_mainbus_found) return (0); -#if 1 - /* XXX Shoot arch/arm/mainbus in the head. */ - return (1); -#else - if (strcmp(cf->cf_name, ma->ma_name) == 0) + if (strcmp(cf->cf_driver->cd_name, ma->ma_name) == 0) return (1); return (0); -#endif } void diff --git a/sys/arch/armish/dev/obio.c b/sys/arch/armish/dev/obio.c index a6b483be28f..0704ba7532e 100644 --- a/sys/arch/armish/dev/obio.c +++ b/sys/arch/armish/dev/obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: obio.c,v 1.2 2006/05/29 17:30:26 drahn Exp $ */ +/* $OpenBSD: obio.c,v 1.3 2006/06/01 17:06:16 drahn Exp $ */ /* $NetBSD: obio.c,v 1.14 2005/12/11 12:17:09 christos Exp $ */ /* @@ -47,6 +47,7 @@ #include <machine/bus.h> +#include <arm/mainbus/mainbus.h> #include <arm/xscale/i80321reg.h> #include <armish/dev/iq80321reg.h> #include <armish/dev/iq80321var.h> @@ -70,24 +71,18 @@ int obio_search(struct device *, void *, void *); int obio_found; int -obio_match(struct device *parent, void *v, void *aux) +obio_match(struct device *parent, void *match, void *aux) { -#if 0 struct mainbus_attach_args *ma = aux; -#endif + struct cfdata *cf = match; if (obio_found) return (0); -#if 1 - /* XXX Shoot arch/arm/mainbus in the head. */ - return (1); -#else - if (strcmp(cf->cf_name, ma->ma_name) == 0) + if (strcmp(cf->cf_driver->cd_name, ma->ma_name) == 0) return (1); return (0); -#endif } void |