diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-05-19 18:42:14 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-05-19 18:42:14 +0000 |
commit | 5d2ff6359ca4a53dc1c448b39265f3ecd2ed8429 (patch) | |
tree | 68989f90b67654dca08e3b35f7ba9a6712417e8e /sys/arch/arm | |
parent | fa629703d5a7a82270cb5b8557a7eb07f52743af (diff) |
Change all remaining MD uses of MALLOC and FREE into proper malloc() and
free() calls; prodded by chl@, ok krw@
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/arm/undefined.c | 6 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_gpio.c | 6 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_intr.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/arm/arm/undefined.c b/sys/arch/arm/arm/undefined.c index f93ea2c4844..636011b3a67 100644 --- a/sys/arch/arm/arm/undefined.c +++ b/sys/arch/arm/arm/undefined.c @@ -1,4 +1,4 @@ -/* $OpenBSD: undefined.c,v 1.3 2006/12/24 20:30:35 miod Exp $ */ +/* $OpenBSD: undefined.c,v 1.4 2008/05/19 18:42:11 miod Exp $ */ /* $NetBSD: undefined.c,v 1.22 2003/11/29 22:21:29 bjh21 Exp $ */ /* @@ -83,7 +83,7 @@ install_coproc_handler(int coproc, undef_handler_t handler) KASSERT(handler != NULL); /* Used to be legal. */ /* XXX: M_TEMP??? */ - MALLOC(uh, struct undefined_handler *, sizeof(*uh), M_TEMP, M_WAITOK); + uh = (struct undefined_handler *)malloc(sizeof(*uh), M_TEMP, M_WAITOK); uh->uh_handler = handler; install_coproc_handler_static(coproc, uh); return uh; @@ -102,7 +102,7 @@ remove_coproc_handler(void *cookie) struct undefined_handler *uh = cookie; LIST_REMOVE(uh, uh_link); - FREE(uh, M_TEMP); + free(uh, M_TEMP); } diff --git a/sys/arch/arm/xscale/pxa2x0_gpio.c b/sys/arch/arm/xscale/pxa2x0_gpio.c index d9d932363aa..748e0535585 100644 --- a/sys/arch/arm/xscale/pxa2x0_gpio.c +++ b/sys/arch/arm/xscale/pxa2x0_gpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_gpio.c,v 1.19 2008/05/15 22:17:08 brad Exp $ */ +/* $OpenBSD: pxa2x0_gpio.c,v 1.20 2008/05/19 18:42:12 miod Exp $ */ /* $NetBSD: pxa2x0_gpio.c,v 1.2 2003/07/15 00:24:55 lukem Exp $ */ /* @@ -230,7 +230,7 @@ pxa2x0_gpio_intr_establish(u_int gpio, int level, int spl, int (*func)(void *), if (GPIO_FN_IS_OUT(pxa2x0_gpio_get_function(gpio)) != GPIO_IN) panic("pxa2x0_gpio_intr_establish: Pin %d not GPIO_IN", gpio); - MALLOC(gh, struct gpio_irq_handler *, sizeof(struct gpio_irq_handler), + gh = (struct gpio_irq_handler *)malloc(sizeof(struct gpio_irq_handler), M_DEVBUF, M_NOWAIT); gh->gh_func = func; @@ -330,7 +330,7 @@ pxa2x0_gpio_intr_disestablish(void *cookie) #endif /* PXAGPIO_HAS_GPION_INTRS */ } - FREE(gh, M_DEVBUF); + free(gh, M_DEVBUF); } #ifdef PXAGPIO_HAS_GPION_INTRS diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c index fc87784be3c..0ba419b4fac 100644 --- a/sys/arch/arm/xscale/pxa2x0_intr.c +++ b/sys/arch/arm/xscale/pxa2x0_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_intr.c,v 1.16 2008/05/15 22:17:08 brad Exp $ */ +/* $OpenBSD: pxa2x0_intr.c,v 1.17 2008/05/19 18:42:12 miod Exp $ */ /* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */ /* @@ -553,7 +553,7 @@ pxa2x0_intr_establish(int irqno, int level, #ifdef MULTIPLE_HANDLERS_ON_ONE_IRQ /* no point in sleeping unless someone can free memory. */ - MALLOC(ih, struct intrhand *, sizeof *ih, M_DEVBUF, + ih = (struct intrhand *)malloc(sizeof *ih, M_DEVBUF, cold ? M_NOWAIT : M_WAITOK); if (ih == NULL) panic("intr_establish: can't malloc handler info"); @@ -599,7 +599,7 @@ pxa2x0_intr_disestablish(void *cookie) psw = disable_interrupts(I32_bit); TAILQ_REMOVE(&handler[irqno].list, ih, ih_list); - FREE(ih, M_DEVBUF); + free(ih, M_DEVBUF); pxa2x0_update_intr_masks(); |