diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-06-24 21:18:00 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-06-24 21:18:00 +0000 |
commit | 9a17f46682926c0c4a22f642a11980feb7dd2ece (patch) | |
tree | b3a36703c6a19479f694938a3eafcea5bd1cb07b | |
parent | ae578410619a8277922511cdb1cff6a5068ca8d2 (diff) |
- remove ISAPNP_FREE and ISAPNP_MALLOC macro's and just use them inline.
ok thib@ deraadt@
-rw-r--r-- | sys/dev/isa/isapnp.c | 10 | ||||
-rw-r--r-- | sys/dev/isa/isapnpres.c | 14 | ||||
-rw-r--r-- | sys/dev/isa/isavar.h | 4 |
3 files changed, 13 insertions, 15 deletions
diff --git a/sys/dev/isa/isapnp.c b/sys/dev/isa/isapnp.c index fe9a1c9c84e..8fd3b6c4cf1 100644 --- a/sys/dev/isa/isapnp.c +++ b/sys/dev/isa/isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isapnp.c,v 1.36 2008/05/21 19:20:08 miod Exp $ */ +/* $OpenBSD: isapnp.c,v 1.37 2010/06/24 21:17:59 jasper Exp $ */ /* $NetBSD: isapnp.c,v 1.9.4.3 1997/10/29 00:40:43 thorpej Exp $ */ /* @@ -443,7 +443,7 @@ isapnp_bestconfig(isa, sc, ipa) return best; } - ISAPNP_FREE(best); + free(best, M_DEVBUF); continue; } else { @@ -455,7 +455,7 @@ isapnp_bestconfig(isa, sc, ipa) continue; d = c->ipa_sibling; if (SAMEDEV(c, best)) - ISAPNP_FREE(c); + free(c, M_DEVBUF); else { if (n) n->ipa_sibling = c; @@ -939,7 +939,7 @@ isapnp_attach(parent, self, aux) if (lpa->ipa_pref == ISAPNP_DEP_CONFLICTING) { isapnp_print(lpa, self->dv_xname); printf(" resource conflict\n"); - ISAPNP_FREE(lpa); + free(lpa, M_DEVBUF); continue; } @@ -964,7 +964,7 @@ isapnp_attach(parent, self, aux) printf(" not configured\n"); isapnp_write_reg(sc, ISAPNP_ACTIVATE, 0); } - ISAPNP_FREE(lpa); + free(lpa, M_DEVBUF); } isapnp_write_reg(sc, ISAPNP_WAKE, 0); /* Good night cards */ } diff --git a/sys/dev/isa/isapnpres.c b/sys/dev/isa/isapnpres.c index d13189927ef..2dd8b592e90 100644 --- a/sys/dev/isa/isapnpres.c +++ b/sys/dev/isa/isapnpres.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isapnpres.c,v 1.6 2002/06/30 16:05:59 miod Exp $ */ +/* $OpenBSD: isapnpres.c,v 1.7 2010/06/24 21:17:59 jasper Exp $ */ /* $NetBSD: isapnpres.c,v 1.7.4.1 1997/11/20 07:46:13 mellon Exp $ */ /* @@ -91,7 +91,7 @@ struct isa_attach_args * isapnp_newdev(card) struct isa_attach_args *card; { - struct isa_attach_args *ipa, *dev = ISAPNP_MALLOC(sizeof(*dev)); + struct isa_attach_args *ipa, *dev = malloc(sizeof(*dev), M_DEVBUF, M_WAITOK); ISAPNP_CLONE_SETUP(dev, card); @@ -120,7 +120,7 @@ struct isa_attach_args * isapnp_newconf(dev) struct isa_attach_args *dev; { - struct isa_attach_args *ipa, *conf = ISAPNP_MALLOC(sizeof(*conf)); + struct isa_attach_args *ipa, *conf = malloc(sizeof(*conf), M_DEVBUF, M_WAITOK); ISAPNP_CLONE_SETUP(conf, dev); @@ -183,7 +183,7 @@ isapnp_flatten(card) struct isa_attach_args *dev, *conf, *d, *c, *pa; dev = card->ipa_child; - ISAPNP_FREE(card); + free(card, M_DEVBUF); for (conf = c = NULL, d = dev; d; d = dev) { dev = d->ipa_sibling; @@ -204,7 +204,7 @@ isapnp_flatten(card) isapnp_merge(pa, d); pa = d->ipa_child; - ISAPNP_FREE(d); + free(d, M_DEVBUF); } if (c == NULL) @@ -451,7 +451,7 @@ isapnp_get_resource(sc, c, template) bzero(buf, sizeof(buf)); - card = ISAPNP_MALLOC(sizeof(*card)); + card = malloc(sizeof(*card), M_DEVBUF, M_WAITOK); ISAPNP_CLONE_SETUP(card, template); #define NEXT_BYTE \ @@ -522,7 +522,7 @@ parse: bad: for (card = isapnp_flatten(card); card; ) { dev = card->ipa_sibling; - ISAPNP_FREE(card); + free(card, M_DEVBUF); card = dev; } printf("%s: %s, card %d\n", sc->sc_dev.dv_xname, diff --git a/sys/dev/isa/isavar.h b/sys/dev/isa/isavar.h index 59fd5cbb27b..129b7a4d0ad 100644 --- a/sys/dev/isa/isavar.h +++ b/sys/dev/isa/isavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: isavar.h,v 1.54 2010/05/23 11:52:37 deraadt Exp $ */ +/* $OpenBSD: isavar.h,v 1.55 2010/06/24 21:17:59 jasper Exp $ */ /* $NetBSD: isavar.h,v 1.26 1997/06/06 23:43:57 thorpej Exp $ */ /*- @@ -153,8 +153,6 @@ struct isapnp_softc; # define ISAPNP_READ_DATA(sc) \ bus_space_read_1(sc->sc_iot, sc->sc_read_ioh, 0) -# define ISAPNP_MALLOC(a) malloc(a, M_DEVBUF, M_WAITOK) -# define ISAPNP_FREE(a) free(a, M_DEVBUF) # define ISAPNP_CLONE_SETUP(dest, src) \ do { \ bzero((dest), sizeof(*(dest))); \ |