diff options
| author | augustss <augustss@NetBSD.org> | 2002-01-02 12:42:23 +0000 |
|---|---|---|
| committer | augustss <augustss@NetBSD.org> | 2002-01-02 12:42:23 +0000 |
| commit | c41bbdcea2eee7da22dc77b01ce75fd59ac01b58 (patch) | |
| tree | 11ccc91c6f29c9449d7cdf5b5114a64e2adafbb0 /sys/dev | |
| parent | b8467dcaa6d7802058162f94881978b745786265 (diff) | |
Change the probe code. You cannot unmap bus space and then use it.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/isa/aztech.c | 12 | ||||
| -rw-r--r-- | sys/dev/isa/radiotrack.c | 12 | ||||
| -rw-r--r-- | sys/dev/isa/radiotrack2.c | 12 | ||||
| -rw-r--r-- | sys/dev/isa/sf16fmr2.c | 12 |
4 files changed, 24 insertions, 24 deletions
diff --git a/sys/dev/isa/aztech.c b/sys/dev/isa/aztech.c index b146bb43741..111988adaec 100644 --- a/sys/dev/isa/aztech.c +++ b/sys/dev/isa/aztech.c @@ -1,4 +1,4 @@ -/* $NetBSD: aztech.c,v 1.1 2002/01/01 21:51:41 augustss Exp $ */ +/* $NetBSD: aztech.c,v 1.2 2002/01/02 12:42:23 augustss Exp $ */ /* $OpenBSD: aztech.c,v 1.2 2001/12/05 10:27:06 mickey Exp $ */ /* $RuOBSD: aztech.c,v 1.11 2001/10/20 13:23:47 pva Exp $ */ @@ -121,7 +121,7 @@ az_probe(struct device *parent, struct cfdata *cf, void *aux) struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; bus_space_handle_t ioh; - + u_int r; int iosize = 1, iobase = ia->ia_iobase; if (!AZ_BASE_VALID(iobase)) { @@ -132,13 +132,13 @@ az_probe(struct device *parent, struct cfdata *cf, void *aux) if (bus_space_map(iot, iobase, iosize, 0, &ioh)) return 0; - bus_space_unmap(iot, ioh, iosize); + r = az_find(iot, ioh); - if (!az_find(iot, ioh)) - return 0; + bus_space_unmap(iot, ioh, iosize); ia->ia_iosize = iosize; - return 1; + + return (r != 0); } void diff --git a/sys/dev/isa/radiotrack.c b/sys/dev/isa/radiotrack.c index 38605cf7f2a..9342d037f0e 100644 --- a/sys/dev/isa/radiotrack.c +++ b/sys/dev/isa/radiotrack.c @@ -1,4 +1,4 @@ -/* $NetBSD: radiotrack.c,v 1.2 2002/01/02 04:10:02 augustss Exp $ */ +/* $NetBSD: radiotrack.c,v 1.3 2002/01/02 12:42:23 augustss Exp $ */ /* $OpenBSD: radiotrack.c,v 1.1 2001/12/05 10:27:06 mickey Exp $ */ /* $RuOBSD: radiotrack.c,v 1.3 2001/10/18 16:51:36 pva Exp $ */ @@ -134,7 +134,7 @@ rt_probe(struct device *parent, struct cfdata *cf, void *aux) struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; bus_space_handle_t ioh; - + u_int r; int iosize = 1, iobase = ia->ia_iobase; if (!RT_BASE_VALID(iobase)) { @@ -145,13 +145,13 @@ rt_probe(struct device *parent, struct cfdata *cf, void *aux) if (bus_space_map(iot, iobase, iosize, 0, &ioh)) return 0; - bus_space_unmap(iot, ioh, iosize); + r = rt_find(iot, ioh); - if (!rt_find(iot, ioh)) - return 0; + bus_space_unmap(iot, ioh, iosize); ia->ia_iosize = iosize; - return 1; + + return (r != 0); } void diff --git a/sys/dev/isa/radiotrack2.c b/sys/dev/isa/radiotrack2.c index f082006e405..e51f9ab2779 100644 --- a/sys/dev/isa/radiotrack2.c +++ b/sys/dev/isa/radiotrack2.c @@ -1,4 +1,4 @@ -/* $NetBSD: radiotrack2.c,v 1.1 2002/01/01 21:51:41 augustss Exp $ */ +/* $NetBSD: radiotrack2.c,v 1.2 2002/01/02 12:42:23 augustss Exp $ */ /* $OpenBSD: radiotrack2.c,v 1.1 2001/12/05 10:27:06 mickey Exp $ */ /* $RuOBSD: radiotrack2.c,v 1.2 2001/10/18 16:51:36 pva Exp $ */ @@ -124,7 +124,7 @@ rtii_probe(struct device *parent, struct cfdata *cf, void *aux) struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; bus_space_handle_t ioh; - + u_int r; int iosize = 1, iobase = ia->ia_iobase; if (!RTII_BASE_VALID(iobase)) { @@ -135,13 +135,13 @@ rtii_probe(struct device *parent, struct cfdata *cf, void *aux) if (bus_space_map(iot, iobase, iosize, 0, &ioh)) return 0; - bus_space_unmap(iot, ioh, iosize); + r = rtii_find(iot, ioh); - if (!rtii_find(iot, ioh)) - return 0; + bus_space_unmap(iot, ioh, iosize); ia->ia_iosize = iosize; - return 1; + + return (r != 0); } void diff --git a/sys/dev/isa/sf16fmr2.c b/sys/dev/isa/sf16fmr2.c index a04ebc47521..14c837cadcc 100644 --- a/sys/dev/isa/sf16fmr2.c +++ b/sys/dev/isa/sf16fmr2.c @@ -1,4 +1,4 @@ -/* $NetBSD: sf16fmr2.c,v 1.1 2002/01/01 21:51:41 augustss Exp $ */ +/* $NetBSD: sf16fmr2.c,v 1.2 2002/01/02 12:42:23 augustss Exp $ */ /* $OpenBSD: sf16fmr2.c,v 1.3 2001/12/18 18:48:08 mickey Exp $ */ /* $RuOBSD: sf16fmr2.c,v 1.12 2001/10/18 16:51:36 pva Exp $ */ @@ -124,7 +124,7 @@ sf2r_probe(struct device *parent, struct cfdata *cf, void *aux) struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; bus_space_handle_t ioh; - + u_int r; int iosize = 1, iobase = ia->ia_iobase; if (!SF16FMR2_BASE_VALID(iobase)) { @@ -135,13 +135,13 @@ sf2r_probe(struct device *parent, struct cfdata *cf, void *aux) if (bus_space_map(iot, iobase, iosize, 0, &ioh)) return 0; - bus_space_unmap(iot, ioh, iosize); + r = sf2r_find(iot, ioh); - if (!sf2r_find(iot, ioh)) - return 0; + bus_space_unmap(iot, ioh, iosize); ia->ia_iosize = iosize; - return 1; + + return (r != 0); } void |
